Skip to content

Commit a01fee4

Browse files
author
Miguel Solorio
committed
Make folding icons foldable
1 parent 2a8adf5 commit a01fee4

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/vs/editor/contrib/folding/folding.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
3333
import { onUnexpectedError } from 'vs/base/common/errors';
3434
import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
3535
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
36-
import { registerColor, editorSelectionBackground, transparent } from 'vs/platform/theme/common/colorRegistry';
36+
import { registerColor, editorSelectionBackground, transparent, iconForeground } from 'vs/platform/theme/common/colorRegistry';
3737

3838
const CONTEXT_FOLDING_ENABLED = new RawContextKey<boolean>('foldingEnabled', false);
3939

@@ -886,10 +886,21 @@ for (let i = 1; i <= 7; i++) {
886886
}
887887

888888
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."));
889+
export const editorFoldForeground = registerColor('editor.foldForeground', { dark: iconForeground, light: iconForeground, hc: iconForeground }, nls.localize('editor.foldForeground', 'Color of the editor folding icons.'));
889890

890891
registerThemingParticipant((theme, collector) => {
891892
const foldBackground = theme.getColor(foldBackgroundBackground);
892893
if (foldBackground) {
893894
collector.addRule(`.monaco-editor .folded-background { background-color: ${foldBackground}; }`);
894895
}
896+
897+
const editorFoldColor = theme.getColor(editorFoldForeground);
898+
if (editorFoldColor) {
899+
collector.addRule(`
900+
.monaco-editor .cldr.codicon-chevron-right,
901+
.monaco-editor .cldr.codicon-chevron-down {
902+
color: ${editorFoldColor} !important;
903+
}
904+
`);
905+
}
895906
});

0 commit comments

Comments
 (0)