From 0af3876d74d201d878e3b63be00a5fae12e27fbe Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 28 Mar 2018 12:31:23 +0200 Subject: [PATCH] restore listInactiveFocusBackground for suggest widget --- src/vs/base/browser/ui/list/listWidget.ts | 6 ++++++ src/vs/editor/contrib/suggest/suggestWidget.ts | 1 + src/vs/platform/theme/common/styler.ts | 2 ++ 3 files changed, 9 insertions(+) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index e43e322860c..8026e676bdd 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -618,6 +618,11 @@ export class DefaultStyleController implements IStyleController { content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected.focused { color: ${styles.listFocusAndSelectionForeground}; }`); } + if (styles.listInactiveFocusBackground) { + content.push(`.monaco-list${suffix} .monaco-list-row.focused { background-color: ${styles.listInactiveFocusBackground}; }`); + content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { background-color: ${styles.listInactiveFocusBackground}; }`); // overwrite :hover style in this case! + } + if (styles.listInactiveSelectionBackground) { content.push(`.monaco-list${suffix} .monaco-list-row.selected { background-color: ${styles.listInactiveSelectionBackground}; }`); content.push(`.monaco-list${suffix} .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`); // overwrite :hover style in this case! @@ -681,6 +686,7 @@ export interface IListStyles { listFocusAndSelectionForeground?: Color; listInactiveSelectionBackground?: Color; listInactiveSelectionForeground?: Color; + listInactiveFocusBackground?: Color; listHoverBackground?: Color; listHoverForeground?: Color; listDropBackground?: Color; diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 2833ee66219..cf433d3dc8a 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -445,6 +445,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.toDispose = [ attachListStyler(this.list, themeService, { + listInactiveFocusBackground: editorSuggestWidgetSelectedBackground, listInactiveFocusOutline: activeContrastBorder }), themeService.onThemeChange(t => this.onThemeChange(t)), diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 1b37ca02714..0b2f83624b6 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -183,6 +183,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground, + listInactiveFocusBackground: (style && style.listInactiveFocusBackground), listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, listHoverForeground: (style && style.listHoverForeground) || listHoverForeground, listDropBackground: (style && style.listDropBackground) || listDropBackground, @@ -201,6 +202,7 @@ export interface IListStyleOverrides extends IStyleOverrides { listFocusAndSelectionForeground?: ColorIdentifier; listInactiveSelectionBackground?: ColorIdentifier; listInactiveSelectionForeground?: ColorIdentifier; + listInactiveFocusBackground?: ColorIdentifier; listHoverBackground?: ColorIdentifier; listHoverForeground?: ColorIdentifier; listDropBackground?: ColorIdentifier;