提交 3918447f 编写于 作者: J Jackson Kearl

Add style token for search editor input border. Fixes #89437.

上级 2e92c8fb
......@@ -13,9 +13,10 @@
"sideBarTitle.foreground": "#6F6F6F",
"list.hoverBackground": "#E8E8E8",
"input.placeholderForeground": "#767676",
"searchEditor.textInputBorder": "#CECECE",
"settings.textInputBorder": "#CECECE",
"settings.numberInputBorder": "#CECECE",
"statusBarItem.remoteForeground": "#FFF",
"statusBarItem.remoteBackground": "#16825D"
}
}
\ No newline at end of file
}
......@@ -8,7 +8,7 @@ import * as dom from 'vs/base/browser/dom';
import { Widget } from 'vs/base/browser/ui/widget';
import { Checkbox } from 'vs/base/browser/ui/checkbox/checkbox';
import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview';
import { IInputValidator, HistoryInputBox } from 'vs/base/browser/ui/inputbox/inputBox';
import { IInputValidator, HistoryInputBox, IInputBoxStyles } from 'vs/base/browser/ui/inputbox/inputBox';
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { Event as CommonEvent, Emitter } from 'vs/base/common/event';
......@@ -19,6 +19,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ISearchConfigurationProperties } from 'vs/workbench/services/search/common/search';
import { Delayer } from 'vs/base/common/async';
import type { IThemable } from 'vs/base/common/styler';
export interface IOptions {
placeholder?: string;
......@@ -30,7 +31,7 @@ export interface IOptions {
submitOnTypeDelay?: number;
}
export class PatternInputWidget extends Widget {
export class PatternInputWidget extends Widget implements IThemable {
static OPTION_CHANGE: string = 'optionChange';
......@@ -133,6 +134,10 @@ export class PatternInputWidget extends Widget {
this.inputBox.showPreviousValue();
}
style(styles: IInputBoxStyles): void {
this.inputBox.style(styles);
}
private render(options: IOptions): void {
this.domNode = document.createElement('div');
this.domNode.style.width = this.width + 'px';
......
......@@ -39,7 +39,8 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c
import { InSearchEditor, InputBoxFocusedKey } from 'vs/workbench/contrib/search/common/constants';
import { IEditorProgressService, LongRunningOperation } from 'vs/platform/progress/common/progress';
import type { SearchEditorInput, SearchConfiguration } from 'vs/workbench/contrib/search/browser/searchEditorInput';
import { searchEditorFindMatchBorder, searchEditorFindMatch } from 'vs/platform/theme/common/colorRegistry';
import { searchEditorFindMatchBorder, searchEditorFindMatch, registerColor, inputBorder } from 'vs/platform/theme/common/colorRegistry';
import { attachInputBoxStyler } from 'vs/platform/theme/common/styler';
const RESULT_LINE_REGEX = /^(\s+)(\d+)(:| )(\s+)(.*)$/;
......@@ -147,6 +148,9 @@ export class SearchEditor extends BaseEditor {
}));
this.inputPatternExcludes.onSubmit(_triggeredOnType => this.runSearch());
this.inputPatternExcludes.onChangeIgnoreBox(() => this.runSearch());
[this.queryEditorWidget.searchInput, this.inputPatternIncludes, this.inputPatternExcludes].map(input =>
this._register(attachInputBoxStyler(input, this.themeService, { inputBorder: searchEditorTextInputBorder })));
}
private createResultsEditor(parent: HTMLElement) {
......@@ -452,3 +456,5 @@ registerThemingParticipant((theme, collector) => {
collector.addRule(`.monaco-editor .searchEditorFindMatch { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${findMatchHighlightBorder}; box-sizing: border-box; }`);
}
});
export const searchEditorTextInputBorder = registerColor('searchEditor.textInputBorder', { dark: inputBorder, light: inputBorder, hc: inputBorder }, localize('textInputBoxBorder', "Search editor text input box border."));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册