diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 25d88261148..3c29932bdee 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -312,7 +312,7 @@ "editorHoverWidget.background": "#000c38", "editorHoverWidget.border": "#004c18", "editorLineNumber.foreground": "#406385", - "editorActiveLineNumber.foreground": "#80a2c2", + "editorLineNumber.activeForeground": "#80a2c2", "editorMarkerNavigation.background": "#060621", "editorMarkerNavigationError.background": "#AB395B", "editorMarkerNavigationWarning.background": "#5B7E7A", diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index d9c98d09157..ebcf0341dc8 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -20,7 +20,7 @@ "editorHoverWidget.background": "#221a14", "editorGroupHeader.tabsBackground": "#131510", "editorGroup.background": "#0f0c08", - "editorActiveLineNumber.foreground": "#adadad", + "editorLineNumber.activeForeground": "#adadad", "tab.inactiveBackground": "#131510", "titleBar.activeBackground": "#423523", "statusBar.background": "#423523", diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 1ac4adbc7f4..0a45c9ffe88 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -13,7 +13,7 @@ "editor.selectionBackground": "#676b7180", "editor.selectionHighlightBackground": "#575b6180", "editor.lineHighlightBackground": "#303030", - "editorActiveLineNumber.foreground": "#949494", + "editorLineNumber.activeForeground": "#949494", "editor.wordHighlightBackground": "#4747a180", "editor.wordHighlightStrongBackground": "#6767ce80", "editorCursor.foreground": "#c07020", diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index d0c7c7e8437..610bf0dc5a2 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -24,7 +24,7 @@ "editor.wordHighlightBackground": "#4a4a7680", "editor.wordHighlightStrongBackground": "#6a6a9680", "editor.lineHighlightBackground": "#3e3d32", - "editorActiveLineNumber.foreground": "#c2c2bf", + "editorLineNumber.activeForeground": "#c2c2bf", "editorCursor.foreground": "#f8f8f0", "editorWhitespace.foreground": "#464741", "editorIndentGuide.background": "#464741", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 9a947168714..3e1ad56f8ad 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -494,7 +494,7 @@ "editor.background": "#F5F5F5", "editorWhitespace.foreground": "#AAAAAA", "editor.lineHighlightBackground": "#E4F6D4", - "editorActiveLineNumber.foreground": "#9769dc", + "editorLineNumber.activeForeground": "#9769dc", "editor.selectionBackground": "#C9D0D9", "panel.background": "#F5F5F5", "sideBar.background": "#F2F2F2", diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 43eaa9b6414..8d69156514c 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -21,7 +21,7 @@ "editorWhitespace.foreground": "#c10000", "editor.selectionBackground": "#750000", "editorLineNumber.foreground": "#ff777788", - "editorActiveLineNumber.foreground": "#ffbbbb88", + "editorLineNumber.activeForeground": "#ffbbbb88", "editorWidget.background": "#300000", "editorHoverWidget.background": "#300000", "editorSuggestWidget.background": "#300000", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index e0c5df0f187..2f5db67fbad 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -355,7 +355,7 @@ "editorCursor.foreground": "#D30102", "editorWhitespace.foreground": "#93A1A180", "editor.lineHighlightBackground": "#073642", - "editorActiveLineNumber.foreground": "#949494", + "editorLineNumber.activeForeground": "#949494", "editor.selectionBackground": "#073642", // "editorIndentGuide.background": "", "editorHoverWidget.background": "#004052", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 0d5b202ea12..d752a613c38 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -354,7 +354,7 @@ "editor.selectionBackground": "#EEE8D5", // "editorIndentGuide.background": "", "editorHoverWidget.background": "#CCC4B0", - "editorActiveLineNumber.foreground": "#567983", + "editorLineNumber.activeForeground": "#567983", // "editorHoverWidget.border": "", // "editorLineNumber.foreground": "", // "editorMarkerNavigation.background": "", diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 0b89e5b9e6c..de15bf88bc8 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -15,7 +15,7 @@ "editor.foreground": "#ffffff", "editor.selectionBackground": "#003f8e", "editor.lineHighlightBackground": "#00346e", - "editorActiveLineNumber.foreground": "#949494", + "editorLineNumber.activeForeground": "#949494", "editorCursor.foreground": "#ffffff", "editorWhitespace.foreground": "#404f7d", "editorWidget.background": "#001c40", diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index e92db6d8195..86cfc23d51a 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -21,7 +21,10 @@ export const editorCursorBackground = registerColor('editorCursor.background', n export const editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('editorWhitespaces', 'Color of whitespace characters in the editor.')); export const editorIndentGuides = registerColor('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); -export const editorActiveLineNumber = registerColor('editorActiveLineNumber.foreground', { dark: null, light: null, hc: null }, nls.localize('editorActiveLineNumber', 'Color of editor active line number')); + +const deprecatedEditorActiveLineNumber = registerColor('editorActiveLineNumber.foreground', { dark: null, light: null, hc: null }, nls.localize('editorActiveLineNumber', 'Color of editor active line number'), false, nls.localize('deprecatedEditorActiveLineNumber', 'Id is deprecated. Use \'editorLineNumber.activeForeground\' instead.')); +export const editorActiveLineNumber = registerColor('editorLineNumber.activeForeground', { dark: deprecatedEditorActiveLineNumber, light: deprecatedEditorActiveLineNumber, hc: deprecatedEditorActiveLineNumber }, nls.localize('editorActiveLineNumber', 'Color of editor active line number')); + export const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5A5A', light: Color.lightgrey, hc: Color.white }, nls.localize('editorRuler', 'Color of the editor rulers.')); export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses')); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 7a283de5e34..66aad012e30 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -86,10 +86,14 @@ class ColorRegistry implements IColorRegistry { this.colorsById = {}; } - public registerColor(id: string, defaults: ColorDefaults, description: string, needsTransparency = false): ColorIdentifier { + public registerColor(id: string, defaults: ColorDefaults, description: string, needsTransparency = false, deprecationMessage?: string): ColorIdentifier { let colorContribution = { id, description, defaults, needsTransparency }; this.colorsById[id] = colorContribution; - this.colorSchema.properties[id] = { type: 'string', description, format: 'color-hex', default: '#ff0000' }; + let propertySchema: IJSONSchema = { type: 'string', description, format: 'color-hex', default: '#ff0000' }; + if (deprecationMessage) { + propertySchema.deprecationMessage = deprecationMessage; + } + this.colorSchema.properties[id] = propertySchema; this.colorReferenceSchema.enum.push(id); this.colorReferenceSchema.enumDescriptions.push(description); return id; @@ -134,8 +138,8 @@ class ColorRegistry implements IColorRegistry { const colorRegistry = new ColorRegistry(); platform.Registry.add(Extensions.ColorContribution, colorRegistry); -export function registerColor(id: string, defaults: ColorDefaults, description: string, needsTransparency?: boolean): ColorIdentifier { - return colorRegistry.registerColor(id, defaults, description, needsTransparency); +export function registerColor(id: string, defaults: ColorDefaults, description: string, needsTransparency?: boolean, deprecationMessage?: string): ColorIdentifier { + return colorRegistry.registerColor(id, defaults, description, needsTransparency, deprecationMessage); } export function getColorRegistry(): IColorRegistry {