From b3f8aee7cf78efecd46f6910fa3d3ae1788cf531 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 20 Mar 2017 14:52:49 +0100 Subject: [PATCH] [theming] place editor theming participants next to the css --- .../currentLineHighlight.ts | 14 ++++++ .../currentLineMarginHighlight.ts | 14 ++++++ .../viewParts/glyphMargin/glyphMargin.ts | 12 +++++- .../viewParts/indentGuides/indentGuides.ts | 9 ++++ .../viewParts/selections/selections.ts | 14 ++++++ .../viewParts/viewCursors/viewCursors.ts | 10 +++++ .../editor/browser/widget/codeEditorWidget.ts | 1 + .../editor/common/view/editorColorRegistry.ts | 43 +------------------ .../browser/goToDeclaration.ts | 11 +++++ src/vs/editor/contrib/hover/browser/hover.ts | 12 ++++++ src/vs/editor/contrib/links/browser/links.ts | 13 ++++++ .../browser/referencesWidget.ts | 16 +++++++ src/vs/platform/theme/common/colorRegistry.ts | 6 +++ .../electron-browser/themeCompatibility.ts | 12 +++--- 14 files changed, 139 insertions(+), 48 deletions(-) diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index d4b6062b155..63dd36dee5c 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -10,6 +10,8 @@ import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry'; export class CurrentLineHighlightOverlay extends DynamicViewOverlay { private _context: ViewContext; @@ -127,3 +129,15 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { this._primaryCursorIsInEditableRange; } } + +registerThemingParticipant((theme, collector) => { + let lineHighlight = theme.getColor(editorLineHighlight); + if (lineHighlight) { + collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { background-color: ${lineHighlight}; border: none; }`); + } else { + let lineHighlightBorder = theme.getColor(editorLineHighlightBorder); + if (lineHighlightBorder) { + collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); + } + } +}); diff --git a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts index 3aa633175fe..cc27cb0879c 100644 --- a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts @@ -10,6 +10,8 @@ import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry'; export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { private _context: ViewContext; @@ -103,3 +105,15 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { return (this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all') && this._primaryCursorIsInEditableRange; } } + +registerThemingParticipant((theme, collector) => { + let lineHighlight = theme.getColor(editorLineHighlight); + if (lineHighlight) { + collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`); + } else { + let lineHighlightBorder = theme.getColor(editorLineHighlightBorder); + if (lineHighlightBorder) { + collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`); + } + } +}); diff --git a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts index a001ce2918b..517e3073e7d 100644 --- a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts +++ b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts @@ -11,6 +11,9 @@ import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; + export class DecorationToRender { _decorationToRenderBrand: void; @@ -205,4 +208,11 @@ export class GlyphMarginOverlay extends DedupOverlay { } return this._renderResult[lineIndex]; } -} \ No newline at end of file +} + +registerThemingParticipant((theme, collector) => { + let editorBackgroundColor = theme.getColor(editorBackground); + if (editorBackgroundColor) { + collector.addRule(`.monaco-editor.${theme.selector} .glyph-margin { background-color: ${editorBackgroundColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts index 5f0ec9e4e83..f4db536d924 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts @@ -10,6 +10,8 @@ import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorGuide } from 'vs/editor/common/view/editorColorRegistry'; export class IndentGuidesOverlay extends DynamicViewOverlay { @@ -111,3 +113,10 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { return this._renderResult[lineIndex]; } } + +registerThemingParticipant((theme, collector) => { + let editorGuideColor = theme.getColor(editorGuide); + if (editorGuideColor) { + collector.addRule(`.monaco-editor.${theme.selector} .lines-content .cigr { background-color: ${editorGuideColor}; }`); + } +}); diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index 0b6d414c483..2da5e140b4a 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -6,6 +6,9 @@ 'use strict'; import 'vs/css!./selections'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorSelection, editorInactiveSelection } from 'vs/platform/theme/common/colorRegistry'; + import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { HorizontalRange, LineVisibleRanges, RenderingContext } from 'vs/editor/common/view/renderingContext'; @@ -396,3 +399,14 @@ export class SelectionsOverlay extends DynamicViewOverlay { return this._renderResult[lineIndex]; } } + +registerThemingParticipant((theme, collector) => { + let editorSelectionColor = theme.getColor(editorSelection); + if (editorSelectionColor) { + collector.addRule(`.monaco-editor.${theme.selector} .focused .selected-text { background-color: ${editorSelectionColor}; }`); + } + let editorInactiveSelectionColor = theme.getColor(editorInactiveSelection); + if (editorInactiveSelectionColor) { + collector.addRule(`.monaco-editor.${theme.selector} .selected-text { background-color: ${editorInactiveSelectionColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index cea3167fb06..b10bf4c0280 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -16,6 +16,8 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { TimeoutTimer } from 'vs/base/common/async'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorCursor } from 'vs/editor/common/view/editorColorRegistry'; export class ViewCursors extends ViewPart { @@ -326,3 +328,11 @@ export class ViewCursors extends ViewPart { return this._renderData; } } + +registerThemingParticipant((theme, collector) => { + let caret = theme.getColor(editorCursor); + if (caret) { + let oppositeCaret = caret.opposite(); + collector.addRule(`.monaco-editor.${theme.selector} .cursor { background-color: ${caret}; border-color: ${caret}; color: ${oppositeCaret}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 943715e28f3..1fd0cb35987 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -5,6 +5,7 @@ 'use strict'; import 'vs/css!./media/editor'; +import 'vs/editor/common/view/editorColorRegistry'; // initialze editor theming partcicpants import 'vs/css!./media/tokens'; import { onUnexpectedError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 1eef39527ee..723dca1bc61 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -22,12 +22,8 @@ function registerColor(id: string, defaults: colorRegistry.ColorDefaults, descri return colorReg.registerColor(id, defaults, description); } -export const editorHoverHighlight = registerColor('editorHoverHighlight', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Background color of the editor hover')); -export const editorActiveLinkForeground = registerColor('editorActiveLinkForeground', { dark: '#4E94CE', light: Color.black, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links')); -export const editorLinkForeground = registerColor('editorLinkForeground', { dark: null, light: null, hc: null }, nls.localize('linkForeground', 'Color of links')); -export const referencesFindMatchHighlight = registerColor('referencesFindMatchHighlight', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('referencesFindMatchHighlight', 'References view match highlight color')); -export const referencesReferenceHighlight = registerColor('referencesReferenceHighlight', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('referencesReferenceHighlight', 'References range highlight color')); export const editorLineHighlight = registerColor('editorLineHighlight', { dark: null, light: null, hc: null }, nls.localize('lineHighlight', 'Editor line highlight color')); +export const editorLineHighlightBorder = registerColor('editorLineHighlightBorderCox', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, nls.localize('lineHighlightBorderBox', 'Editor line highlight border box color')); export const editorRangeHighlight = registerColor('editorRangeHighlight', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, nls.localize('rangeHighlight', 'Background color of range highlighted, like by Quick open and Find features')); export const editorCursor = registerColor('editorCursor', { dark: '#AEAFAD', light: Color.black, hc: Color.white }, nls.localize('caret', 'Editor cursor color')); export const editorInvisibles = registerColor('editorInvisibles', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('invisibles', 'Editor invisibles color')); @@ -39,35 +35,9 @@ function applyEditorStyles(theme: ITheme, collector: ICssStyleCollector) { let background = theme.getColor(colorRegistry.editorBackground); if (background) { addBackgroundColorRule(theme, '.monaco-editor-background', background, collector); - addBackgroundColorRule(theme, '.glyph-margin', background, collector); collector.addRule(`.${theme.selector} .monaco-workbench .monaco-editor-background { background-color: ${background}; }`); } - addBackgroundColorRule(theme, '.hoverHighlight', theme.getColor(editorHoverHighlight), collector); - - let activeLinkForeground = theme.getColor(editorActiveLinkForeground); - if (activeLinkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .detected-link-active { color: ${activeLinkForeground} !important; }`); - collector.addRule(`.monaco-editor.${theme.selector} .goto-definition-link { color: ${activeLinkForeground} !important; }`); - } - let linkForeground = theme.getColor(editorLinkForeground); - if (linkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .detected-link { color: ${linkForeground} !important; }`); - } - - let selection = theme.getColor(colorRegistry.editorSelection); - if (selection) { - addBackgroundColorRule(theme, '.focused .selected-text', selection, collector); - } - - let inactiveSelection = theme.getColor(colorRegistry.editorInactiveSelection); - if (inactiveSelection) { - addBackgroundColorRule(theme, '.selected-text', inactiveSelection, collector); - } - - addBackgroundColorRule(theme, '.reference-zone-widget .ref-tree .referenceMatch', theme.getColor(referencesFindMatchHighlight), collector); - addBackgroundColorRule(theme, '.reference-zone-widget .preview .reference-decoration', theme.getColor(referencesReferenceHighlight), collector); - let lineHighlight = theme.getColor(editorLineHighlight); if (lineHighlight) { collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { background-color: ${lineHighlight}; border: none; }`); @@ -77,21 +47,10 @@ function applyEditorStyles(theme: ITheme, collector: ICssStyleCollector) { } addBackgroundColorRule(theme, '.rangeHighlight', theme.getColor(editorRangeHighlight), collector); - let caret = theme.getColor(editorCursor); - if (caret) { - let oppositeCaret = caret.opposite(); - collector.addRule(`.monaco-editor.${theme.selector} .cursor { background-color: ${caret}; border-color: ${caret}; color: ${oppositeCaret}; }`); - } - let invisibles = theme.getColor(editorInvisibles); if (invisibles) { collector.addRule(`.vs-whitespace { color: ${invisibles} !important; }`); } - - let color = theme.getColor(editorGuide); - if (color) { - collector.addRule(`.monaco-editor.${theme.selector} .lines-content .cigr { background: ${color}; }`); - } } function addBackgroundColorRule(theme: ITheme, selector: string, color: Color, collector: ICssStyleCollector): void { diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index 4f34046a8a9..8d157ccb2e8 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -38,6 +38,10 @@ import * as corePosition from 'vs/editor/common/core/position'; import ModeContextKeys = editorCommon.ModeContextKeys; import EditorContextKeys = editorCommon.EditorContextKeys; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; + + export class DefinitionActionConfig { constructor( @@ -624,3 +628,10 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.toUnhook = dispose(this.toUnhook); } } + +registerThemingParticipant((theme, collector) => { + let activeLinkForeground = theme.getColor(editorActiveLinkForeground); + if (activeLinkForeground) { + collector.addRule(`.monaco-editor.${theme.selector} .goto-definition-link { color: ${activeLinkForeground} !important; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index dc3e994478c..4195e2fe4c2 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -21,8 +21,13 @@ import { ModesContentHoverWidget } from './modesContentHover'; import { ModesGlyphHoverWidget } from './modesGlyphHover'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { ITheme, ICssStyleCollector, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; + import EditorContextKeys = editorCommon.EditorContextKeys; +export const editorHoverHighlight = registerColor('editorHoverHighlight', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Background color of the editor hover')); + @editorContribution export class ModesHoverController implements editorCommon.IEditorContribution { @@ -170,3 +175,10 @@ class ShowHoverAction extends EditorAction { controller.showContentHover(range, true); } } + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + let editorHoverHighlightColor = theme.getColor(editorHoverHighlight); + if (editorHoverHighlightColor) { + collector.addRule(`.monaco-editor.${theme.selector} .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`); + } +}); diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 55fc820e554..18f84d907c4 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -23,6 +23,8 @@ import { IEditorMouseEvent, ICodeEditor } from 'vs/editor/browser/editorBrowser' import { getLinks, Link } from 'vs/editor/contrib/links/common/links'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorLinkForeground, editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; class LinkOccurence { @@ -341,3 +343,14 @@ class OpenLinkAction extends EditorAction { } } } + +registerThemingParticipant((theme, collector) => { + let activeLinkForeground = theme.getColor(editorActiveLinkForeground); + if (activeLinkForeground) { + collector.addRule(`.monaco-editor.${theme.selector} .detected-link-active { color: ${activeLinkForeground} !important; }`); + } + let linkForeground = theme.getColor(editorLinkForeground); + if (linkForeground) { + collector.addRule(`.monaco-editor.${theme.selector} .detected-link { color: ${linkForeground} !important; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 7fdb7418c19..a1be31da088 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -37,6 +37,11 @@ import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeE import { PeekViewWidget, IPeekViewService } from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget'; import { FileReferences, OneReference, ReferencesModel } from './referencesModel'; import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; + +export const referencesFindMatchHighlight = registerColor('referencesFindMatchHighlight', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('referencesFindMatchHighlight', 'References view match highlight color')); +export const referencesReferenceHighlight = registerColor('referencesReferenceHighlight', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('referencesReferenceHighlight', 'References range highlight color')); class DecorationsManager implements IDisposable { @@ -752,3 +757,14 @@ export class ReferenceWidget extends PeekViewWidget { }, onUnexpectedError); } } + +registerThemingParticipant((theme, collector) => { + let referencesFindMatchHighlightColor = theme.getColor(referencesFindMatchHighlight); + if (referencesFindMatchHighlightColor) { + collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .referenceMatch { background-color: ${referencesFindMatchHighlightColor}; }`); + } + let referencesReferenceHighlightColor = theme.getColor(referencesReferenceHighlight); + if (referencesReferenceHighlightColor) { + collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .preview .reference-decoration { background-color: ${referencesReferenceHighlightColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 59ecf365ec1..e9942e54dcb 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -145,6 +145,12 @@ export const editorFindMatchHighlight = registerColor('editorFindMatchHighlight' export const editorCurrentFindMatchHighlight = registerColor('editorCurrentFindMatchHighlight', { light: '#A8AC94', dark: '#515C6A', hc: null }, nls.localize('currentFindMatchHighlight', "Background color of the current region matching the search")); export const editorFindRangeHighlight = registerColor('editorFindRangeHighlight', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, nls.localize('findRangeHighlight', "Background color of regions selected for search")); +/** + * Editor link colors + */ +export const editorActiveLinkForeground = registerColor('editorActiveLinkForeground', { dark: '#4E94CE', light: Color.black, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links')); +export const editorLinkForeground = registerColor('editorLinkForeground', { dark: null, light: null, hc: null }, nls.localize('linkForeground', 'Color of links')); + // ----- color functions diff --git a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts index 8c0367f2f2e..216b0653547 100644 --- a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts +++ b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts @@ -10,6 +10,8 @@ import * as colorRegistry from 'vs/platform/theme/common/colorRegistry'; import * as editorColorRegistry from 'vs/editor/common/view/editorColorRegistry'; import * as wordHighlighter from 'vs/editor/contrib/wordHighlighter/common/wordHighlighter'; import { ansiColorIdentifiers } from 'vs/workbench/parts/terminal/electron-browser/terminalColorRegistry'; +import { editorHoverHighlight } from "vs/editor/contrib/hover/browser/hover"; +import { referencesReferenceHighlight, referencesFindMatchHighlight } from "vs/editor/contrib/referenceSearch/browser/referencesWidget"; const settingToColorIdMapping: { [settingId: string]: string[] } = {}; @@ -52,14 +54,14 @@ addSettingMapping('inactiveSelection', colorRegistry.editorInactiveSelection); addSettingMapping('selectionHighlightColor', colorRegistry.editorSelectionHighlightColor); addSettingMapping('findMatchHighlight', colorRegistry.editorFindMatchHighlight); addSettingMapping('currentFindMatchHighlight', colorRegistry.editorCurrentFindMatchHighlight); -addSettingMapping('hoverHighlight', editorColorRegistry.editorHoverHighlight); -addSettingMapping('hoverHighlight', editorColorRegistry.editorHoverHighlight); -addSettingMapping('linkForeground', editorColorRegistry.editorLinkForeground); +addSettingMapping('hoverHighlight', editorHoverHighlight); +addSettingMapping('hoverHighlight', editorHoverHighlight); +addSettingMapping('linkForeground', colorRegistry.editorLinkForeground); addSettingMapping('wordHighlight', wordHighlighter.editorWordHighlight); addSettingMapping('wordHighlightStrong', wordHighlighter.editorWordHighlightString); addSettingMapping('findRangeHighlight', colorRegistry.editorFindRangeHighlight); -addSettingMapping('findMatchHighlight', editorColorRegistry.referencesFindMatchHighlight); -addSettingMapping('referenceHighlight', editorColorRegistry.referencesReferenceHighlight); +addSettingMapping('findMatchHighlight', referencesFindMatchHighlight); +addSettingMapping('referenceHighlight', referencesReferenceHighlight); addSettingMapping('lineHighlight', editorColorRegistry.editorLineHighlight); addSettingMapping('rangeHighlight', editorColorRegistry.editorRangeHighlight); addSettingMapping('caret', editorColorRegistry.editorCursor); -- GitLab