提交 3ace0229 编写于 作者: R rebornix

fix #101937. update theme colors when theme switches.

上级 9a220aa3
......@@ -267,7 +267,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
public updateTheme(theme: IColorTheme): void {
const inputStyles: IFindInputStyles = {
inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder),
inputActiveOptionForeground: theme.getColor(inputActiveOptionBackground),
inputActiveOptionForeground: theme.getColor(inputActiveOptionForeground),
inputActiveOptionBackground: theme.getColor(inputActiveOptionBackground),
inputBackground: theme.getColor(inputBackground),
inputForeground: theme.getColor(inputForeground),
......@@ -280,7 +280,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder),
inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground),
inputValidationErrorForeground: theme.getColor(inputValidationErrorForeground),
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder)
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder),
};
this._findInput.style(inputStyles);
const replaceStyles: IReplaceInputStyles = {
......@@ -298,7 +298,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder),
inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground),
inputValidationErrorForeground: theme.getColor(inputValidationErrorForeground),
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder)
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder),
};
this._replaceInput.style(replaceStyles);
}
......
......@@ -53,6 +53,9 @@ export class NotebookFindWidget extends SimpleFindReplaceWidget implements INote
this._findWidgetFocused = KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED.bindTo(contextKeyService);
this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e)));
this.updateTheme(themeService.getColorTheme());
this._register(themeService.onDidColorThemeChange(() => {
this.updateTheme(themeService.getColorTheme());
}));
}
private _onFindInputKeyDown(e: IKeyboardEvent): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册