Skip to content

Commit 2b73072

Browse files
author
Benjamin Pasero
committed
theme - get rid of list.focusAndSelectionBackground
1 parent f22230f commit 2b73072

9 files changed

Lines changed: 10 additions & 13 deletions

File tree

extensions/theme-abyss/themes/abyss-color-theme.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@
276276
"button.hoverBackground": "#4A5C6B",
277277
// "button.foreground": "",
278278

279-
"list.focusAndSelectionBackground": "#08286b",
280279
"list.activeSelectionBackground": "#011B51",
281280
// "list.activeSelectionForeground": "",
282281
"list.focusBackground": "#08286b",

extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// "focusBorder": "#00f9ff",
66
"dropdown.background": "#383852",
77
"list.activeSelectionBackground": "#303050",
8-
"list.focusAndSelectionBackground": "#383852",
98
"list.inactiveSelectionBackground": "#303d45",
109
"list.hoverBackground": "#005070",
1110
"list.dropBackground": "#505590",

extensions/theme-monokai/themes/monokai-color-theme.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"dropdown.background": "#383852",
77
"list.activeSelectionBackground": "#303070",
88
"list.focusBackground": "#394770",
9-
"list.focusAndSelectionBackground": "#383852",
109
"list.inactiveSelectionBackground": "#303d45",
1110
"list.hoverBackground": "#005070",
1211
"list.dropBackground": "#505590",

extensions/theme-quietlight/themes/quietlight-color-theme.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@
458458
"pickerGroup.border": "#749351",
459459
"list.activeSelectionForeground": "#6c6c6c",
460460
"list.focusBackground": "#CADEB9",
461-
"list.focusAndSelectionBackground": "#A2B294",
462461
"list.activeSelectionBackground": "#B6C8A7",
463462
"editor.background": "#F5F5F5",
464463
"editorWhitespace.foreground": "#AAAAAA",

extensions/theme-red/themes/Red-color-theme.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"list.activeSelectionBackground": "#700000",
4848
"list.inactiveSelectionBackground": "#770000",
4949
"list.focusBackground": "#660000",
50-
"list.focusAndSelectionBackground": "#880000",
5150
"list.highlightForeground": "#ff4444",
5251
"notification.background": "#662222",
5352
"pickerGroup.foreground": "#cc9999",

extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@
316316
"button.hoverBackground": "#2AA19844",
317317
// "button.foreground": "",
318318

319-
"list.focusAndSelectionBackground": "#005A6F",
320319
"list.activeSelectionBackground": "#004454",
321320
// "list.activeSelectionForeground": "",
322321
"list.focusBackground": "#005A6F",

extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"dropdown.background": "#001733",
77
"list.focusBackground": "#ffffff60",
88
"list.activeSelectionBackground": "#ffffff50",
9-
"list.focusAndSelectionBackground": "#ffffff60",
109
"list.inactiveSelectionBackground": "#ffffff40",
1110
"list.hoverBackground": "#ffffff30",
1211
"list.dropBackground": "#ffffff60",

src/vs/platform/theme/common/colorRegistry.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ export const listFocusBackground = registerColor('list.focusBackground', { dark:
147147
export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#0E639C', light: '#4FA7FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
148148
export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));
149149
export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));
150-
export const listFocusAndSelectionBackground = registerColor('list.focusAndSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listFocusAndSelectionBackground', "List/Tree background color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors."));
151150
export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse."));
152151
export const listDropBackground = registerColor('list.dropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse."));
153152
export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.'));

src/vs/platform/theme/common/styler.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,24 @@
66
'use strict';
77

88
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
9-
import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground } from 'vs/platform/theme/common/colorRegistry';
9+
import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, darken } from 'vs/platform/theme/common/colorRegistry';
1010
import { IDisposable } from 'vs/base/common/lifecycle';
1111
import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme';
1212

1313
export interface IThemable {
1414
style(colors: { [name: string]: ColorIdentifier }): void;
1515
}
1616

17-
export function attachStyler(themeService: IThemeService, widget: IThemable, optionsMapping: { [optionsKey: string]: ColorIdentifier }): IDisposable {
17+
export function attachStyler(themeService: IThemeService, widget: IThemable, optionsMapping: { [optionsKey: string]: ColorIdentifier | ColorFunction }): IDisposable {
1818
function applyStyles(theme: ITheme): void {
1919
const styles = Object.create(null);
2020
for (let key in optionsMapping) {
21-
styles[key] = theme.getColor(optionsMapping[key]);
21+
const value = optionsMapping[key];
22+
if (typeof value === 'string') {
23+
styles[key] = theme.getColor(value);
24+
} else if (typeof value === 'function') {
25+
styles[key] = value(theme);
26+
}
2227
}
2328

2429
widget.style(styles);
@@ -142,7 +147,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer
142147
listFocusBackground: (style && style.listFocusBackground) || listFocusBackground,
143148
listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground,
144149
listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground,
145-
listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground,
150+
listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || darken(listActiveSelectionBackground, 0.1),
146151
listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground,
147152
listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,
148153
listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,
@@ -172,7 +177,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService,
172177
listFocusBackground: (style && style.listFocusBackground) || listFocusBackground,
173178
listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground,
174179
listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground,
175-
listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground,
180+
listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || darken(listActiveSelectionBackground, 0.1),
176181
listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground,
177182
listInactiveFocusBackground: (style && style.listInactiveFocusBackground),
178183
listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,

0 commit comments

Comments
 (0)