From a01fee40f0945ba218354f88656a447f79b70433 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Mon, 3 Feb 2020 11:10:46 -0800 Subject: [PATCH 1/2] Make folding icons foldable --- src/vs/editor/contrib/folding/folding.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/folding/folding.ts b/src/vs/editor/contrib/folding/folding.ts index b236c12ab2a..6a5c142608b 100644 --- a/src/vs/editor/contrib/folding/folding.ts +++ b/src/vs/editor/contrib/folding/folding.ts @@ -33,7 +33,7 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis import { onUnexpectedError } from 'vs/base/common/errors'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, editorSelectionBackground, transparent } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorSelectionBackground, transparent, iconForeground } from 'vs/platform/theme/common/colorRegistry'; const CONTEXT_FOLDING_ENABLED = new RawContextKey('foldingEnabled', false); @@ -886,10 +886,21 @@ for (let i = 1; i <= 7; i++) { } export const foldBackgroundBackground = registerColor('editor.foldBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hc: null }, nls.localize('editorSelectionBackground', "Color of the editor selection.")); +export const editorFoldForeground = registerColor('editor.foldForeground', { dark: iconForeground, light: iconForeground, hc: iconForeground }, nls.localize('editor.foldForeground', 'Color of the editor folding icons.')); registerThemingParticipant((theme, collector) => { const foldBackground = theme.getColor(foldBackgroundBackground); if (foldBackground) { collector.addRule(`.monaco-editor .folded-background { background-color: ${foldBackground}; }`); } + + const editorFoldColor = theme.getColor(editorFoldForeground); + if (editorFoldColor) { + collector.addRule(` + .monaco-editor .cldr.codicon-chevron-right, + .monaco-editor .cldr.codicon-chevron-down { + color: ${editorFoldColor} !important; + } + `); + } }); From 8bfcffb83091a07901be3eb9eeb03f7ba0146a59 Mon Sep 17 00:00:00 2001 From: Miguel Solorio Date: Thu, 16 Apr 2020 23:13:35 -0700 Subject: [PATCH 2/2] Update folding control token description --- src/vs/editor/contrib/folding/folding.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/folding/folding.ts b/src/vs/editor/contrib/folding/folding.ts index fde4284b915..6d444d41e65 100644 --- a/src/vs/editor/contrib/folding/folding.ts +++ b/src/vs/editor/contrib/folding/folding.ts @@ -898,7 +898,7 @@ for (let i = 1; i <= 7; i++) { } export const foldBackgroundBackground = registerColor('editor.foldBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hc: null }, nls.localize('foldBackgroundBackground', "Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."), true); -export const editorFoldForeground = registerColor('editorGutter.foldingControlForeground', { dark: iconForeground, light: iconForeground, hc: iconForeground }, nls.localize('editorGutter.foldingControlForeground', 'Color of the folding control icon in the editor gutter.')); +export const editorFoldForeground = registerColor('editorGutter.foldingControlForeground', { dark: iconForeground, light: iconForeground, hc: iconForeground }, nls.localize('editorGutter.foldingControlForeground', 'Color of the folding control in the editor gutter.')); registerThemingParticipant((theme, collector) => { const foldBackground = theme.getColor(foldBackgroundBackground);