提交 9d1fc803 编写于 作者: B Benjamin Pasero

Disabled input box in search viewlet is badly colored (fixes #24700)

上级 45f7f619
......@@ -293,16 +293,6 @@
display: none;
}
.vs .search-viewlet input.disabled,
.vs .search-viewlet .file-types.disabled .monaco-inputbox {
background-color: #E1E1E1;
}
.vs-dark .search-viewlet input.disabled,
.vs-dark .search-viewlet .file-types.disabled .monaco-inputbox {
background-color: #333;
}
.search-viewlet .focused .monaco-tree-row.selected:not(.highlighted) > .content.actions .action-remove,
.vs-dark .monaco-workbench .search-viewlet .focused .monaco-tree-row.selected:not(.highlighted) > .content.actions .action-remove {
background: url("action-remove-focus.svg") center center no-repeat;
......@@ -405,11 +395,6 @@
text-decoration: underline;
}
.search-viewlet .global-exclude input.disabled,
.search-viewlet .file-types.disabled.global-exclude .monaco-inputbox {
background: none;
}
/* Theming */
.search-viewlet .highlight {
......@@ -451,10 +436,6 @@
opacity: .5;
}
.vs-dark .search-viewlet .global-exclude input.disabled {
opacity: .5 !important;
}
.vs-dark .search-viewlet .filematch {
padding: 0;
}
......
......@@ -63,6 +63,7 @@ import { editorFindMatchHighlight } from 'vs/platform/theme/common/colorRegistry
import FileResultsNavigation from 'vs/workbench/browser/fileResultsNavigation';
import { attachListStyler } from "vs/platform/theme/common/styler";
import { IOutputService } from 'vs/workbench/parts/output/common/output';
import { Color } from "vs/base/common/color";
export class SearchViewlet extends Viewlet {
......@@ -242,17 +243,19 @@ export class SearchViewlet extends Viewlet {
});
// add hint if we have global exclusion
this.inputPatternGlobalExclusionsContainer = builder.div({ 'class': 'file-types global-exclude disabled' }, (builder) => {
this.inputPatternGlobalExclusionsContainer = builder.div({ 'class': 'file-types global-exclude' }, (builder) => {
let title = nls.localize('global.searchScope.folders', "files excluded through settings");
builder.element('h4', { text: title });
this.inputPatternGlobalExclusions = new InputBox(builder.getContainer(), this.contextViewService, {
actions: [this.instantiationService.createInstance(ConfigureGlobalExclusionsAction)],
ariaLabel: nls.localize('label.global.excludes', 'Configured Search Exclude Patterns')
ariaLabel: nls.localize('label.global.excludes', 'Configured Search Exclude Patterns'),
// override some styles because this input is disabled
inputBackground: Color.transparent,
inputForeground: null
});
this.inputPatternGlobalExclusions.inputElement.readOnly = true;
$(this.inputPatternGlobalExclusions.inputElement).attr('aria-readonly', 'true');
$(this.inputPatternGlobalExclusions.inputElement).addClass('disabled');
}).hide();
}).getHTMLElement();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册