diff --git a/build/npm/update-theme.js b/build/npm/update-theme.js index 4698c459009..c721502ad66 100644 --- a/build/npm/update-theme.js +++ b/build/npm/update-theme.js @@ -11,7 +11,7 @@ var plist = require('fast-plist'); var mappings = { "ansiBlack": ["terminalAnsiBlack"], "ansiRed": ["terminalAnsiRed"], "ansiGreen": ["terminalAnsiGreen"], "ansiYellow": ["terminalAnsiYellow"], "ansiBlue": ["terminalAnsiBlue"], "ansiMagenta": ["terminalAnsiMagenta"], "ansiCyan": ["terminalAnsiCyan"], "ansiWhite": ["terminalAnsiWhite"], "ansiBrightBlack": ["terminalAnsiBrightBlack"], "ansiBrightRed": ["terminalAnsiBrightRed"], "ansiBrightGreen": ["terminalAnsiBrightGreen"], "ansiBrightYellow": ["terminalAnsiBrightYellow"], "ansiBrightBlue": ["terminalAnsiBrightBlue"], "ansiBrightMagenta": ["terminalAnsiBrightMagenta"], "ansiBrightCyan": ["terminalAnsiBrightCyan"], "ansiBrightWhite": ["terminalAnsiBrightWhite"], "background": ["editorBackground"], - "hoverHighlight": ["editorHoverHighlight", "editorHoverHighlight"], "linkForeground": ["editorLinkForeground"], "selection": ["editorSelection"], "inactiveSelection": ["editorInactiveSelection"], "selectionHighlightColor": ["editorSelectionHighlightColor"], "wordHighlight": ["editorWordHighlight"], "wordHighlightStrong": ["editorWordHighlightStrong"], "findMatchHighlight": ["editorFindMatchHighlight", "referencesFindMatchHighlight"], "currentFindMatchHighlight": ["editorCurrentFindMatchHighlight"], "findRangeHighlight": ["editorFindRangeHighlight"], "referenceHighlight": ["referencesReferenceHighlight"], "lineHighlight": ["editorLineHighlight"], "rangeHighlight": ["editorRangeHighlight"], "caret": ["editorCursor"], "invisibles": ["editorInvisibles"], "guide": ["editorGuide"] + "hoverHighlight": ["editorHoverHighlight", "editorHoverHighlight"], "linkForeground": ["editorLinkForeground"], "selection": ["editorSelection"], "inactiveSelection": ["editorInactiveSelection"], "selectionHighlightColor": ["editorSelectionHighlight"], "wordHighlight": ["editorWordHighlight"], "wordHighlightStrong": ["editorWordHighlightStrong"], "findMatchHighlight": ["editorFindMatchHighlight", "referencesFindMatchHighlight"], "currentFindMatchHighlight": ["editorCurrentFindMatchHighlight"], "findRangeHighlight": ["editorFindRangeHighlight"], "referenceHighlight": ["referencesReferenceHighlight"], "lineHighlight": ["editorLineHighlight"], "rangeHighlight": ["editorRangeHighlight"], "caret": ["editorCursor"], "invisibles": ["editorInvisibles"], "guide": ["editorGuide"] }; exports.update = function (srcName, destName) { diff --git a/extensions/theme-defaults/themes/dark_defaults.json b/extensions/theme-defaults/themes/dark_defaults.json index 58a6ef2e14e..9bb216fe40b 100644 --- a/extensions/theme-defaults/themes/dark_defaults.json +++ b/extensions/theme-defaults/themes/dark_defaults.json @@ -6,6 +6,6 @@ "editorForeground": "#D4D4D4", "editorInactiveSelection": "#3A3D41", "editorGuide": "#404040", - "editorSelectionHighlightColor": "#add6ff26" + "editorSelectionHighlight": "#add6ff26" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/light_defaults.json b/extensions/theme-defaults/themes/light_defaults.json index afca9304fb8..63371831836 100644 --- a/extensions/theme-defaults/themes/light_defaults.json +++ b/extensions/theme-defaults/themes/light_defaults.json @@ -6,6 +6,6 @@ "editorForeground": "#000000", "editorInactiveSelection": "#E5EBF1", "editorGuide": "#d3d3d3", - "editorSelectionHighlightColor": "#add6ff4d" + "editorSelectionHighlight": "#add6ff4d" } } \ No newline at end of file diff --git a/src/vs/editor/common/standalone/themes.ts b/src/vs/editor/common/standalone/themes.ts index 311617cea47..9a6f3044a87 100644 --- a/src/vs/editor/common/standalone/themes.ts +++ b/src/vs/editor/common/standalone/themes.ts @@ -72,7 +72,7 @@ export const vs: IStandaloneThemeData = { editorForeground: '#000000', editorInactiveSelection: '#E5EBF1', editorGuide: '#D3D3D3', - editorSelectionHighlightColor: '#ADD6FF4D' + editorSelectionHighlight: '#ADD6FF4D' } }; /* -------------------------------- End vs theme -------------------------------- */ @@ -142,7 +142,7 @@ export const vs_dark: IStandaloneThemeData = { editorForeground: '#D4D4D4', editorInactiveSelection: '#3A3D41', editorGuide: '#404040', - editorSelectionHighlightColor: '#ADD6FF26' + editorSelectionHighlight: '#ADD6FF26' } }; /* -------------------------------- End vs-dark theme -------------------------------- */ diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index b1ac64479f7..2cdfadbc949 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -16,7 +16,7 @@ import { DocumentHighlight, DocumentHighlightKind, DocumentHighlightProviderRegi import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Position } from 'vs/editor/common/core/position'; -import { registerColor, editorSelectionHighlightColor, highContrastOutline } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorSelectionHighlight, highContrastOutline } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; export const editorWordHighlight = registerColor('editorWordHighlight', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable')); @@ -317,7 +317,7 @@ class WordHighlighterContribution implements editorCommon.IEditorContribution { } registerThemingParticipant((theme, collector) => { - let selectionHighlight = theme.getColor(editorSelectionHighlightColor); + let selectionHighlight = theme.getColor(editorSelectionHighlight); if (selectionHighlight) { collector.addRule(`.monaco-editor.${theme.selector} .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); collector.addRule(`.monaco-editor.${theme.selector} .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index b2a38c5e9e0..9e852d98e5e 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -155,8 +155,8 @@ export const editorForeground = registerColor('editorForeground', { light: '#333 * Editor selection colors. */ export const editorSelection = registerColor('editorSelection', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, nls.localize('editorSelection', "Color of the editor selection")); -export const editorInactiveSelection = registerColor('editorInactiveSelection', { light: transparent(editorSelection, 0.5), dark: transparent(editorSelection, 0.5), hc: null }, nls.localize('editorInactiveSelection', "Color of the inactive editor selection")); -export const editorSelectionHighlightColor = registerColor('editorSelectionHighlightColor', { light: lessProminent(editorSelection, editorBackground, 0.3), dark: lessProminent(editorSelection, editorBackground, 0.3), hc: null }, nls.localize('editorsSelectionHighlightColor', "Background color of regions highlighted while selecting")); +export const editorInactiveSelection = registerColor('editorInactiveSelection', { light: transparent(editorSelection, 0.5), dark: transparent(editorSelection, 0.5), hc: null }, nls.localize('editorInactiveSelection', "Color of the selection in an inactive editor")); +export const editorSelectionHighlight = registerColor('editorSelectionHighlight', { light: lessProminent(editorSelection, editorBackground, 0.3), dark: lessProminent(editorSelection, editorBackground, 0.3), hc: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection')); /** * Editor find match colors. diff --git a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts index 782f81aa58d..4edb443ec83 100644 --- a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts +++ b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts @@ -52,7 +52,7 @@ export function convertSettings(oldSettings: ITokenColorizationRule[], resultRul addSettingMapping('background', colorRegistry.editorBackground); addSettingMapping('selection', colorRegistry.editorSelection); addSettingMapping('inactiveSelection', colorRegistry.editorInactiveSelection); -addSettingMapping('selectionHighlightColor', colorRegistry.editorSelectionHighlightColor); +addSettingMapping('selectionHighlightColor', colorRegistry.editorSelectionHighlight); addSettingMapping('findMatchHighlight', colorRegistry.editorFindMatchHighlight); addSettingMapping('currentFindMatchHighlight', colorRegistry.editorCurrentFindMatchHighlight); addSettingMapping('hoverHighlight', editorHoverHighlight);