提交 9bc399dd 编写于 作者: C Christof Marti

Ensure inactive focus background is overridden (#49340)

上级 a5cde11b
......@@ -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);
......
......@@ -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}; }`);
}
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册