From c74305cf641014a80c9248ad5d095399f27d72e3 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 19 Apr 2017 10:51:35 +0200 Subject: [PATCH] Find widget no longer themed. Fixes #24954 --- .../themes/solarized-dark-color-theme.json | 2 +- src/vs/editor/contrib/find/browser/findWidget.ts | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index c1f1da4bc05..05045d2b0a3 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -303,7 +303,7 @@ "activityBarBackground": "#003847", "activityBarDragAndDropBackground": "#00212B", "activityBadgeBackground": "#047aa6", - "editorFindWidgetBackground": "#00212B", + "editorWidgetBackground": "#00212B", "inputBoxBackground": "#003847", "inputBoxForeground": "#93A1A1", "inputBoxActiveOptionBorder": "#2AA19899", diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 5cb6324391e..e19d0c2255d 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -13,7 +13,7 @@ import * as strings from 'vs/base/common/strings'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; 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 { Widget } from 'vs/base/browser/ui/widget'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; @@ -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 { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService'; 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 { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, highContrastOutline, highContrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, editorWidgetShadow, inputForeground, inputBorder } from "vs/platform/theme/common/colorRegistry"; export interface IFindController { replace(): void; @@ -348,8 +348,14 @@ export class FindWidget extends Widget implements IOverlayWidget { } 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._replaceInputBox.style(inputStyles); } // ----- Public @@ -799,10 +805,6 @@ registerThemingParticipant((theme, collector) => { addBackgroundColorRule('.currentFindMatch', theme.getColor(editorFindMatch)); 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); addBackgroundColorRule('.find-widget', widgetBackground); -- GitLab