mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-10 16:58:55 -05:00
[theme] linenumbers theming
This commit is contained in:
@@ -266,6 +266,7 @@
|
||||
"editorPeekEditorBackground": "#001F33",
|
||||
"editorPeekTitleBackground": "#060621",
|
||||
"editorPeekBorders": "#7777cc",
|
||||
"editorLineNumbers": "#0000FF",
|
||||
|
||||
// Workbench Colors
|
||||
"tabsContainerBackground": "#1c1c2a",
|
||||
|
||||
@@ -36,7 +36,3 @@
|
||||
.monaco-editor .margin-view-overlays .line-numbers.lh-odd {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.monaco-editor.vs .line-numbers { color: #2B91AF; }
|
||||
.monaco-editor.vs-dark .line-numbers { color: #5A5A5A; }
|
||||
.monaco-editor.hc-black .line-numbers { color: #FFF; }
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
'use strict';
|
||||
|
||||
import 'vs/css!./lineNumbers';
|
||||
import { editorLineNumbers } from "vs/editor/common/view/editorColorRegistry";
|
||||
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay';
|
||||
import { ClassNames } from 'vs/editor/browser/editorBrowser';
|
||||
@@ -135,4 +137,13 @@ export class LineNumbersOverlay extends DynamicViewOverlay {
|
||||
}
|
||||
return this._renderResult[lineIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// theming
|
||||
|
||||
registerThemingParticipant((theme, collector) => {
|
||||
let lineNumbers = theme.getColor(editorLineNumbers);
|
||||
if (lineNumbers) {
|
||||
collector.addRule(`.monaco-editor.${theme.selector} .line-numbers { color: ${lineNumbers}; }`);
|
||||
}
|
||||
});
|
||||
@@ -17,6 +17,8 @@ export const editorRangeHighlight = registerColor('editorRangeHighlight', { dark
|
||||
export const editorCursor = registerColor('editorCursor', { dark: '#AEAFAD', light: Color.black, hc: Color.white }, nls.localize('caret', 'Editor cursor color'));
|
||||
export const editorInvisibles = registerColor('editorInvisibles', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('invisibles', 'Editor invisibles color'));
|
||||
export const editorGuide = registerColor('editorGuide', { dark: editorInvisibles, light: editorInvisibles, hc: editorInvisibles }, nls.localize('guide', 'Editor guide color'));
|
||||
export const editorLineNumbers = registerColor('editorLineNumbers', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Editor line numbers'));
|
||||
|
||||
|
||||
// contains all color rules that used to defined in editor/browser/widget/editor.css
|
||||
registerThemingParticipant((theme, collector) => {
|
||||
|
||||
Reference in New Issue
Block a user