Skip to content

Commit d5125cb

Browse files
authored
Polish Settings editor styling (microsoft#165767)
* Remove .mid-width class * Polish settings tabs widget border alignment
1 parent 283aa61 commit d5125cb

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

src/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label.checked {
9696
opacity: 1;
9797
color: var(--vscode-settings-headerForeground);
98+
}
99+
.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label.checked:not(:focus) {
98100
border-bottom-color: var(--vscode-settings-headerForeground);
99101
}
100102

@@ -112,10 +114,6 @@
112114
/* padding must be on action-label because it has the bottom-border, because that's where the .checked class is */
113115
}
114116

115-
.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget > .monaco-action-bar .action-item.focused {
116-
outline-offset: -1.5px;
117-
}
118-
119117
.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget > .monaco-action-bar .action-item .action-label {
120118
text-transform: none;
121119
font-size: 13px;
@@ -130,8 +128,8 @@
130128
}
131129

132130
.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget > .monaco-action-bar .action-item .action-label:not(.checked):not(:focus) {
133-
/* Add an extra pixel due to it not getting the outline */
134-
padding-bottom: 8px;
131+
/* Still maintain a border for alignment, but keep it transparent */
132+
border-bottom: 1px solid transparent;
135133
}
136134

137135
.settings-editor > .settings-body {
@@ -202,15 +200,6 @@
202200
outline: 1px solid var(--vscode-settings-focusedRowBorder);
203201
}
204202

205-
.settings-editor.mid-width > .settings-body .settings-tree-container .settings-editor-tree > .monaco-scrollable-element > .shadow.top {
206-
left: 0;
207-
width: calc(100% - 48px);
208-
margin-left: 24px;
209-
}
210-
.settings-editor.mid-width > .settings-body .settings-tree-container .settings-editor-tree > .monaco-scrollable-element > .shadow.top.top-left-corner {
211-
width: 24px;
212-
margin-left: 0px;
213-
}
214203
.settings-editor > .settings-body .settings-tree-container .settings-editor-tree > .monaco-scrollable-element > .shadow.top {
215204
z-index: 11;
216205
}

src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export class SettingsEditor2 extends EditorPane {
104104
private static EDITOR_MIN_WIDTH: number = 500;
105105
// Below NARROW_TOTAL_WIDTH, we only render the editor rather than the ToC.
106106
private static NARROW_TOTAL_WIDTH: number = SettingsEditor2.TOC_RESET_WIDTH + SettingsEditor2.EDITOR_MIN_WIDTH;
107-
private static MEDIUM_TOTAL_WIDTH: number = 1000;
108107

109108
private static SUGGESTIONS: string[] = [
110109
`@${MODIFIED_SETTING_TAG}`,
@@ -442,7 +441,6 @@ export class SettingsEditor2 extends EditorPane {
442441
const monacoWidth = innerWidth - 10 - this.countElement.clientWidth - this.controlsElement.clientWidth - 12;
443442
this.searchWidget.layout(new DOM.Dimension(monacoWidth, 20));
444443

445-
this.rootElement.classList.toggle('mid-width', dimension.width < SettingsEditor2.MEDIUM_TOTAL_WIDTH && dimension.width >= SettingsEditor2.NARROW_TOTAL_WIDTH);
446444
this.rootElement.classList.toggle('narrow-width', dimension.width < SettingsEditor2.NARROW_TOTAL_WIDTH);
447445
}
448446

@@ -1675,7 +1673,7 @@ export class SettingsEditor2 extends EditorPane {
16751673
this.splitView.resizeView(0, SettingsEditor2.TOC_RESET_WIDTH);
16761674
}
16771675
this.splitView.style({
1678-
separatorBorder: firstViewVisible ? this.theme.getColor(settingsSashBorder) ?? Color.transparent : Color.transparent
1676+
separatorBorder: firstViewVisible ? this.theme.getColor(settingsSashBorder)! : Color.transparent
16791677
});
16801678
}
16811679

0 commit comments

Comments
 (0)