Skip to content

Commit de1e481

Browse files
authored
Merge pull request microsoft#93732 from robertrossmann/feat/editor-overview-ruler-background
Add editorOverviewRuler.background colour customisation point
2 parents 9f45c20 + 3eb7096 commit de1e481

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart';
1010
import { Position } from 'vs/editor/common/core/position';
1111
import { IConfiguration } from 'vs/editor/common/editorCommon';
1212
import { TokenizationRegistry } from 'vs/editor/common/modes';
13-
import { editorCursorForeground, editorOverviewRulerBorder } from 'vs/editor/common/view/editorColorRegistry';
13+
import { editorCursorForeground, editorOverviewRulerBorder, editorOverviewRulerBackground } from 'vs/editor/common/view/editorColorRegistry';
1414
import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext';
1515
import { ViewContext, EditorTheme } from 'vs/editor/common/view/viewContext';
1616
import * as viewEvents from 'vs/editor/common/view/viewEvents';
@@ -60,7 +60,10 @@ class Settings {
6060
const minimapOpts = options.get(EditorOption.minimap);
6161
const minimapEnabled = minimapOpts.enabled;
6262
const minimapSide = minimapOpts.side;
63-
const backgroundColor = (minimapEnabled ? TokenizationRegistry.getDefaultBackground() : null);
63+
const backgroundColor = minimapEnabled
64+
? theme.getColor(editorOverviewRulerBackground) || TokenizationRegistry.getDefaultBackground()
65+
: null;
66+
6467
if (backgroundColor === null || minimapSide === 'left') {
6568
this.backgroundColor = null;
6669
} else {

src/vs/editor/common/view/editorColorRegistry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const editorBracketMatchBackground = registerColor('editorBracketMatch.ba
3636
export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: contrastBorder }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes'));
3737

3838
export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.'));
39+
export const editorOverviewRulerBackground = registerColor('editorOverviewRuler.background', null, nls.localize('editorOverviewRulerBackground', 'Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.'));
3940

4041
export const editorGutter = registerColor('editorGutter.background', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.'));
4142

0 commit comments

Comments
 (0)