提交 c74305cf 编写于 作者: M Martin Aeschlimann

Find widget no longer themed. Fixes #24954

上级 3927c0fb
...@@ -303,7 +303,7 @@ ...@@ -303,7 +303,7 @@
"activityBarBackground": "#003847", "activityBarBackground": "#003847",
"activityBarDragAndDropBackground": "#00212B", "activityBarDragAndDropBackground": "#00212B",
"activityBadgeBackground": "#047aa6", "activityBadgeBackground": "#047aa6",
"editorFindWidgetBackground": "#00212B", "editorWidgetBackground": "#00212B",
"inputBoxBackground": "#003847", "inputBoxBackground": "#003847",
"inputBoxForeground": "#93A1A1", "inputBoxForeground": "#93A1A1",
"inputBoxActiveOptionBorder": "#2AA19899", "inputBoxActiveOptionBorder": "#2AA19899",
......
...@@ -13,7 +13,7 @@ import * as strings from 'vs/base/common/strings'; ...@@ -13,7 +13,7 @@ import * as strings from 'vs/base/common/strings';
import * as dom from 'vs/base/browser/dom'; import * as dom from 'vs/base/browser/dom';
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview';
import { FindInput } from 'vs/base/browser/ui/findinput/findInput'; import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput';
import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
import { Widget } from 'vs/base/browser/ui/widget'; import { Widget } from 'vs/base/browser/ui/widget';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
...@@ -25,8 +25,8 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c ...@@ -25,8 +25,8 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c
import { CONTEXT_FIND_INPUT_FOCUSSED } from 'vs/editor/contrib/find/common/findController'; import { CONTEXT_FIND_INPUT_FOCUSSED } from 'vs/editor/contrib/find/common/findController';
import { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService'; import { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService';
import { Color } from 'vs/base/common/color'; import { Color } from 'vs/base/common/color';
import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, highContrastOutline, highContrastBorder, inputBackground as findInputBackground, editorWidgetBackground, inputActiveOptionBorder, editorWidgetShadow } from "vs/platform/theme/common/colorRegistry";
import { IConfigurationChangedEvent } from "vs/editor/common/config/editorOptions"; import { IConfigurationChangedEvent } from "vs/editor/common/config/editorOptions";
import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, highContrastOutline, highContrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, editorWidgetShadow, inputForeground, inputBorder } from "vs/platform/theme/common/colorRegistry";
export interface IFindController { export interface IFindController {
replace(): void; replace(): void;
...@@ -348,8 +348,14 @@ export class FindWidget extends Widget implements IOverlayWidget { ...@@ -348,8 +348,14 @@ export class FindWidget extends Widget implements IOverlayWidget {
} }
private _applyTheme(theme: ITheme) { private _applyTheme(theme: ITheme) {
let inputStyles = { inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder) }; let inputStyles: IFindInputStyles = {
inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder),
inputBackground: theme.getColor(inputBackground),
inputForeground: theme.getColor(inputForeground),
inputBorder: theme.getColor(inputBorder)
};
this._findInput.style(inputStyles); this._findInput.style(inputStyles);
this._replaceInputBox.style(inputStyles);
} }
// ----- Public // ----- Public
...@@ -799,10 +805,6 @@ registerThemingParticipant((theme, collector) => { ...@@ -799,10 +805,6 @@ registerThemingParticipant((theme, collector) => {
addBackgroundColorRule('.currentFindMatch', theme.getColor(editorFindMatch)); addBackgroundColorRule('.currentFindMatch', theme.getColor(editorFindMatch));
addBackgroundColorRule('.findScope', theme.getColor(editorFindRangeHighlight)); addBackgroundColorRule('.findScope', theme.getColor(editorFindRangeHighlight));
let inputBackground = theme.getColor(findInputBackground);
addBackgroundColorRule('.find-widget .monaco-findInput', inputBackground);
addBackgroundColorRule('.find-widget .replace-input', inputBackground);
let widgetBackground = theme.getColor(editorWidgetBackground); let widgetBackground = theme.getColor(editorWidgetBackground);
addBackgroundColorRule('.find-widget', widgetBackground); addBackgroundColorRule('.find-widget', widgetBackground);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册