introduce listHighlightForeground (fixes #25496)

This commit is contained in:
Benjamin Pasero 2017-04-27 11:15:33 +02:00
parent 59c86095fd
commit 11ff12299c
9 changed files with 18 additions and 29 deletions

View file

@ -285,6 +285,7 @@
"listInactiveFocusBackground": "#152037",
"listInactiveSelectionBackground": "#152037",
"listDropBackground": "#041D52",
// "listHighlightForeground": "",
"scrollbarShadow": "#515E91AA",
"scrollbarSliderActiveBackground": "#3B3F5188",
@ -316,7 +317,6 @@
"editorLinkForeground": "#0063a5",
// "editorRangeHighlight": "",
// "editorSelectionHighlight": "",
// "editorSuggestMatchHighlight": "",
// "editorSuggestWidgetBackground": "",
// "editorSuggestWidgetBorder": "",
// "editorWordHighlight": "",

View file

@ -22,7 +22,6 @@
"editorHoverBackground": "#300000",
"editorSuggestWidgetBackground": "#300000",
"editorSuggestWidgetBorder": "#220000",
"editorSuggestMatchHighlight": "#ff4444",
"editorLineHighlight": "#ff000033",
"editorHoverHighlight": "#ff000044",
"editorSelectionHighlight": "#f5500039",
@ -44,6 +43,7 @@
"listInactiveSelectionBackground": "#770000",
"listFocusBackground": "#660000",
"listFocusAndSelectionBackground": "#880000",
"listHighlightForeground": "#ff4444",
"notificationsBackground": "#662222",
"pickerGroupForeground": "#cc9999",
"pickerGroupBorder": "#ff000033",

View file

@ -325,6 +325,7 @@
"listInactiveFocusBackground": "#00445488",
"listInactiveSelectionBackground": "#00445488",
"listDropBackground": "#00445488",
// "listHighlightForeground": "",
// "scrollbarShadow": "",
// "scrollbarSliderActiveBackground": "",
@ -356,7 +357,6 @@
// "editorLinkForeground": "",
// "editorRangeHighlight": "",
// "editorSelectionHighlight": "",
// "editorSuggestMatchHighlight": "",
// "editorSuggestWidgetBackground": "",
// "editorSuggestWidgetBorder": "",
// "editorWordHighlight": "",

View file

@ -149,13 +149,6 @@
height: 16px;
}
/* Theming */
.quick-open-widget .quick-open-tree .monaco-highlighted-label .highlight {
color: #007ACC;
font-weight: bold;
}
.vs-dark .quick-open-widget .quick-open-tree .monaco-highlighted-label .highlight {
color: #0097FB;
}

View file

@ -29,7 +29,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { attachListStyler } from 'vs/platform/theme/common/styler';
import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { registerColor, editorWidgetBackground, highContrastBorder, listFocusBackground, highContrastOutline } from 'vs/platform/theme/common/colorRegistry';
import { registerColor, editorWidgetBackground, highContrastBorder, listFocusBackground, highContrastOutline, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry';
const sticky = false; // for development purposes
@ -49,7 +49,6 @@ interface ISuggestionTemplateData {
*/
export const editorSuggestWidgetBackground = registerColor('editorSuggestWidgetBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.'));
export const editorSuggestWidgetBorder = registerColor('editorSuggestWidgetBorder', { dark: '#454545', light: '#C8C8C8', hc: highContrastBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.'));
export const editorSuggestMatchHighlight = registerColor('editorSuggestMatchHighlight', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('editorSuggestMatchHighlight', 'Color of the match highlight in the suggest widget.'));
const colorRegExp = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;
function matchesColor(text: string) {
@ -926,7 +925,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
}
registerThemingParticipant((theme, collector) => {
let matchHighlight = theme.getColor(editorSuggestMatchHighlight);
let matchHighlight = theme.getColor(listHighlightForeground);
if (matchHighlight) {
collector.addRule(`.monaco-editor.${theme.selector} .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`);
}

View file

@ -162,6 +162,7 @@ export const listFocusAndSelectionForeground = registerColor('listFocusAndSelect
export const listInactiveSelectionBackground = registerColor('listInactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree selection background when inactive."));
export const listHoverBackground = registerColor('listHoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree hover background."));
export const listDropBackground = registerColor('listDropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background."));
export const listHighlightForeground = registerColor('listHighlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree color of the match highlight.'));
export const pickerGroupForeground = registerColor('pickerGroupForeground', { dark: Color.fromHex('#0097FB').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.6), hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels."));
export const pickerGroupBorder = registerColor('pickerGroupBorder', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders."));

View file

@ -104,7 +104,7 @@ import 'vs/platform/opener/browser/opener.contribution';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService';
import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
import { foreground, focus, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground } from 'vs/platform/theme/common/colorRegistry';
import { foreground, focus, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry';
/**
* Services that we require for the Shell
@ -518,6 +518,17 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
collector.addRule(`.monaco-shell { color: ${windowForeground}; }`);
}
// List highlight
const listHighlightForegroundColor = theme.getColor(listHighlightForeground);
if (listHighlightForegroundColor) {
collector.addRule(`
.monaco-shell .monaco-tree .monaco-tree-row .monaco-highlighted-label .highlight,
.monaco-shell .monaco-list .monaco-list-row .monaco-highlighted-label .highlight {
color: ${listHighlightForegroundColor};
}
`);
}
// We need to set the workbench background color so that on Windows we get subpixel-antialiasing.
let workbenchBackground: string;
switch (theme.type) {

View file

@ -86,14 +86,9 @@
}
.markers-panel .markers-panel-container .tree-container .markers-panel-tree-entry .highlight {
color: #007ACC;
font-weight: bold;
}
.vs-dark .markers-panel .markers-panel-container .tree-container .markers-panel-tree-entry .highlight {
color: #0097FB;
}
.markers-panel .icon {
height: 22px;
margin-right: 4px;

View file

@ -163,19 +163,9 @@
}
.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight {
color: #007ACC;
font-weight: bold;
}
.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight {
color: #1b3c53;
}
.vs-dark .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight,
.hc-black .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight {
color: #049aff;
}
.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar {
display: none;
flex: 1;