Skip to content

Commit 0af3876

Browse files
author
Benjamin Pasero
committed
restore listInactiveFocusBackground for suggest widget
1 parent 1659e65 commit 0af3876

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/vs/base/browser/ui/list/listWidget.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,11 @@ export class DefaultStyleController implements IStyleController {
618618
content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected.focused { color: ${styles.listFocusAndSelectionForeground}; }`);
619619
}
620620

621+
if (styles.listInactiveFocusBackground) {
622+
content.push(`.monaco-list${suffix} .monaco-list-row.focused { background-color: ${styles.listInactiveFocusBackground}; }`);
623+
content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { background-color: ${styles.listInactiveFocusBackground}; }`); // overwrite :hover style in this case!
624+
}
625+
621626
if (styles.listInactiveSelectionBackground) {
622627
content.push(`.monaco-list${suffix} .monaco-list-row.selected { background-color: ${styles.listInactiveSelectionBackground}; }`);
623628
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 {
681686
listFocusAndSelectionForeground?: Color;
682687
listInactiveSelectionBackground?: Color;
683688
listInactiveSelectionForeground?: Color;
689+
listInactiveFocusBackground?: Color;
684690
listHoverBackground?: Color;
685691
listHoverForeground?: Color;
686692
listDropBackground?: Color;

src/vs/editor/contrib/suggest/suggestWidget.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
445445

446446
this.toDispose = [
447447
attachListStyler(this.list, themeService, {
448+
listInactiveFocusBackground: editorSuggestWidgetSelectedBackground,
448449
listInactiveFocusOutline: activeContrastBorder
449450
}),
450451
themeService.onThemeChange(t => this.onThemeChange(t)),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer
183183
listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground,
184184
listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground,
185185
listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground,
186+
listInactiveFocusBackground: (style && style.listInactiveFocusBackground),
186187
listHoverBackground: (style && style.listHoverBackground) || listHoverBackground,
187188
listHoverForeground: (style && style.listHoverForeground) || listHoverForeground,
188189
listDropBackground: (style && style.listDropBackground) || listDropBackground,
@@ -201,6 +202,7 @@ export interface IListStyleOverrides extends IStyleOverrides {
201202
listFocusAndSelectionForeground?: ColorIdentifier;
202203
listInactiveSelectionBackground?: ColorIdentifier;
203204
listInactiveSelectionForeground?: ColorIdentifier;
205+
listInactiveFocusBackground?: ColorIdentifier;
204206
listHoverBackground?: ColorIdentifier;
205207
listHoverForeground?: ColorIdentifier;
206208
listDropBackground?: ColorIdentifier;

0 commit comments

Comments
 (0)