提交 6d2cd6c1 编写于 作者: B Benjamin Pasero

fix #23441

上级 7e26ba1a
......@@ -6,7 +6,7 @@
'use strict';
import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService';
import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, highContrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, highContrastBorder, editorFindCheckedBorders } from 'vs/platform/theme/common/colorRegistry';
import { IDisposable } from "vs/base/common/lifecycle";
export interface IThemable {
......@@ -44,6 +44,15 @@ export function attachSelectBoxStyler(widget: IThemable, themeService: IThemeSer
});
}
export function attachFindInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: { inputBackground?: ColorIdentifier, inputForeground?: ColorIdentifier, inputBorder?: ColorIdentifier, checkedBorderColor?: ColorIdentifier }): IDisposable {
return attachStyler(themeService, widget, {
inputBackground: (style && style.inputBackground) || inputBackground,
inputForeground: (style && style.inputForeground) || inputForeground,
inputBorder: (style && style.inputBorder) || inputBorder,
checkedBorderColor: (style && style.checkedBorderColor) || editorFindCheckedBorders
});
}
export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService, style?: { foreground?: ColorIdentifier, background?: ColorIdentifier, borderColor?: ColorIdentifier, inputBackground?: ColorIdentifier, inputForeground?: ColorIdentifier, inputBorder?: ColorIdentifier }): IDisposable {
return attachStyler(themeService, widget, {
foreground: (style && style.foreground) || foreground,
......
......@@ -27,7 +27,7 @@ import { isSearchViewletFocussed, appendKeyBindingLabel } from 'vs/workbench/par
import { CONTEXT_FIND_WIDGET_NOT_VISIBLE } from 'vs/editor/contrib/find/common/findController';
import { HistoryNavigator } from 'vs/base/common/history';
import * as Constants from 'vs/workbench/parts/search/common/constants';
import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
import { attachInputBoxStyler, attachFindInputBoxStyler } from 'vs/platform/theme/common/styler';
import { IThemeService } from 'vs/platform/theme/common/themeService';
export interface ISearchWidgetOptions {
......@@ -219,7 +219,7 @@ export class SearchWidget extends Widget {
let searchInputContainer = dom.append(parent, dom.$('.search-container.input-box'));
this.searchInput = this._register(new FindInput(searchInputContainer, this.contextViewService, inputOptions));
this._register(attachInputBoxStyler(this.searchInput, this.themeService));
this._register(attachFindInputBoxStyler(this.searchInput, this.themeService));
this.searchInput.onKeyUp((keyboardEvent: IKeyboardEvent) => this.onSearchInputKeyUp(keyboardEvent));
this.searchInput.setValue(options.value || '');
this.searchInput.setRegex(!!options.isRegex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册