From 2a2cff86df2edd66a2c26e332110828b3b413f33 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 11 Apr 2017 10:27:30 +0200 Subject: [PATCH] Selection occurrences decorations are on top of diagnostics. Fixes #24436 --- src/vs/platform/theme/common/colorRegistry.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 8a2d9b0bd17..e67df743f8b 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -161,7 +161,7 @@ export const editorForeground = registerColor('editorForeground', { light: '#333 */ 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 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.')); +export const editorSelectionHighlight = registerColor('editorSelectionHighlight', { light: lessProminent(editorSelection, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelection, editorBackground, 0.3, 0.6), hc: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection.')); /** * Editor find match colors. @@ -203,18 +203,18 @@ export function transparent(colorValue: ColorValue, factor: number): ColorFuncti }; } -export function lessProminent(colorValue: ColorValue, backgroundColorValue: ColorValue, factor: number): ColorFunction { +function lessProminent(colorValue: ColorValue, backgroundColorValue: ColorValue, factor: number, transparency: number): ColorFunction { return (theme) => { let from = resolveColorValue(colorValue, theme); if (from) { let backgroundColor = resolveColorValue(backgroundColorValue, theme); if (backgroundColor) { if (from.isDarkerThan(backgroundColor)) { - return Color.getLighterColor(from, backgroundColor, factor); + return Color.getLighterColor(from, backgroundColor, factor).transparent(transparency); } - return Color.getDarkerColor(from, backgroundColor, factor); + return Color.getDarkerColor(from, backgroundColor, factor).transparent(transparency); } - return from.transparent(factor); + return from.transparent(factor * transparency); } return null; }; -- GitLab