diff --git a/src/vs/workbench/browser/parts/quickinput/quickInput.ts b/src/vs/workbench/browser/parts/quickinput/quickInput.ts index 3d77ec3f87b468e160a93cc80441320970920b8d..f052e126c46cae43a94b4597d9fd10c16a63959d 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInput.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInput.ts @@ -646,7 +646,6 @@ export class QuickInputService extends Component implements IQuickInputService { const theme = this.themeService.getTheme(); if (this.ui) { this.ui.inputBox.style(theme); - this.ui.checkboxList.style(theme); } if (this.container) { const sideBarBackground = theme.getColor(SIDE_BAR_BACKGROUND); diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputCheckboxList.ts b/src/vs/workbench/browser/parts/quickinput/quickInputCheckboxList.ts index f8a2f6774a60d73a7a86248abd20eeafdb7fbb76..6894dc69a2188483544e59c68695dba520889a7d 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInputCheckboxList.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInputCheckboxList.ts @@ -25,7 +25,7 @@ import { memoize } from 'vs/base/common/decorators'; import { range } from 'vs/base/common/arrays'; import * as platform from 'vs/base/common/platform'; import { listFocusBackground } from 'vs/platform/theme/common/colorRegistry'; -import { ITheme } from 'vs/platform/theme/common/themeService'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; const $ = dom.$; @@ -381,12 +381,6 @@ export class QuickInputCheckboxList { } } - style(theme: ITheme) { - this.list.style({ - listInactiveFocusBackground: theme.getColor(listFocusBackground), - }); - } - display(display: boolean) { this.container.style.display = display ? '' : 'none'; } @@ -421,4 +415,13 @@ function compareEntries(elementA: CheckableElement, elementB: CheckableElement, } return compareAnything(elementA.item.label, elementB.item.label, lookFor); -} \ No newline at end of file +} + +registerThemingParticipant((theme, collector) => { + // Override inactive focus background with active focus background for single-pick case. + const listInactiveFocusBackground = theme.getColor(listFocusBackground); + if (listInactiveFocusBackground) { + collector.addRule(`.quick-input-checkbox-list .monaco-list .monaco-list-row.focused { background-color: ${listInactiveFocusBackground}; }`); + collector.addRule(`.quick-input-checkbox-list .monaco-list .monaco-list-row.focused:hover { background-color: ${listInactiveFocusBackground}; }`); + } +});