Skip to content

Commit 0cab2d5

Browse files
a5hkbpasero
andauthored
Adds support for separate horizontal and vertical borders for side by side editor (microsoft#135181)
* horizontal and vertical border for side by side editor * 💄 Co-authored-by: Benjamin Pasero <[email protected]>
1 parent e29d3cc commit 0cab2d5

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/vs/workbench/browser/parts/editor/sideBySideEditor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { IEditorOptions } from 'vs/platform/editor/common/editor';
2525
import { IConfigurationChangeEvent, IConfigurationService } from 'vs/platform/configuration/common/configuration';
2626
import { DEFAULT_EDITOR_MIN_DIMENSIONS } from 'vs/workbench/browser/parts/editor/editor';
2727
import { DisposableStore } from 'vs/base/common/lifecycle';
28-
import { SIDE_BY_SIDE_EDITOR_BORDER } from 'vs/workbench/common/theme';
28+
import { SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER, SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER } from 'vs/workbench/common/theme';
2929
import { AbstractEditorWithViewState } from 'vs/workbench/browser/parts/editor/editorWithViewState';
3030
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService';
3131
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -433,13 +433,13 @@ export class SideBySideEditor extends AbstractEditorWithViewState<ISideBySideEdi
433433
if (this.orientation === Orientation.HORIZONTAL) {
434434
this.primaryEditorContainer.style.borderLeftWidth = '1px';
435435
this.primaryEditorContainer.style.borderLeftStyle = 'solid';
436-
this.primaryEditorContainer.style.borderLeftColor = this.getColor(SIDE_BY_SIDE_EDITOR_BORDER)?.toString() ?? '';
436+
this.primaryEditorContainer.style.borderLeftColor = this.getColor(SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER)?.toString() ?? '';
437437

438438
this.primaryEditorContainer.style.borderTopWidth = '0';
439439
} else {
440440
this.primaryEditorContainer.style.borderTopWidth = '1px';
441441
this.primaryEditorContainer.style.borderTopStyle = 'solid';
442-
this.primaryEditorContainer.style.borderTopColor = this.getColor(SIDE_BY_SIDE_EDITOR_BORDER)?.toString() ?? '';
442+
this.primaryEditorContainer.style.borderTopColor = this.getColor(SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER)?.toString() ?? '';
443443

444444
this.primaryEditorContainer.style.borderLeftWidth = '0';
445445
}

src/vs/workbench/common/theme.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,17 @@ export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBa
243243
hc: null
244244
}, localize('editorDragAndDropBackground', "Background color when dragging editors around. The color should have transparency so that the editor contents can still shine through."));
245245

246-
export const SIDE_BY_SIDE_EDITOR_BORDER = registerColor('sideBySideEditor.border', {
246+
export const SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER = registerColor('sideBySideEditor.horizontalBorder', {
247247
dark: EDITOR_GROUP_BORDER,
248248
light: EDITOR_GROUP_BORDER,
249249
hc: EDITOR_GROUP_BORDER
250-
}, localize('sideBySideEditor.border', "Color to separate two editors from each other when shown side by side in an editor group."));
250+
}, localize('sideBySideEditor.horizontalBorder', "Color to separate two editors from each other when shown side by side in an editor group from top to bottom."));
251+
252+
export const SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER = registerColor('sideBySideEditor.verticalBorder', {
253+
dark: EDITOR_GROUP_BORDER,
254+
light: EDITOR_GROUP_BORDER,
255+
hc: EDITOR_GROUP_BORDER
256+
}, localize('sideBySideEditor.verticalBorder', "Color to separate two editors from each other when shown side by side in an editor group from left to right."));
251257

252258
// < --- Panels --- >
253259

0 commit comments

Comments
 (0)