Add comment draft color to overview ruler (#276972)

RE: https://github.com/microsoft/vscode/pull/271536#discussion_r2518015387
This commit is contained in:
Alex Ross 2025-11-12 19:43:29 +01:00 committed by GitHub
parent 771bfcfb38
commit 89b8b71fd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -305,6 +305,7 @@
"--vscode-editorOverviewRuler-bracketMatchForeground",
"--vscode-editorOverviewRuler-commentForeground",
"--vscode-editorOverviewRuler-commentUnresolvedForeground",
"--vscode-editorOverviewRuler-commentDraftForeground",
"--vscode-editorOverviewRuler-commonContentForeground",
"--vscode-editorOverviewRuler-currentContentForeground",
"--vscode-editorOverviewRuler-deletedForeground",

View File

@ -18,6 +18,7 @@ import { Emitter } from '../../../../base/common/event.js';
export const overviewRulerCommentingRangeForeground = registerColor('editorGutter.commentRangeForeground', { dark: opaque(listInactiveSelectionBackground, editorBackground), light: darken(opaque(listInactiveSelectionBackground, editorBackground), .05), hcDark: Color.white, hcLight: Color.black }, nls.localize('editorGutterCommentRangeForeground', 'Editor gutter decoration color for commenting ranges. This color should be opaque.'));
const overviewRulerCommentForeground = registerColor('editorOverviewRuler.commentForeground', overviewRulerCommentingRangeForeground, nls.localize('editorOverviewRuler.commentForeground', 'Editor overview ruler decoration color for resolved comments. This color should be opaque.'));
const overviewRulerCommentUnresolvedForeground = registerColor('editorOverviewRuler.commentUnresolvedForeground', overviewRulerCommentForeground, nls.localize('editorOverviewRuler.commentUnresolvedForeground', 'Editor overview ruler decoration color for unresolved comments. This color should be opaque.'));
const overviewRulerCommentDraftForeground = registerColor('editorOverviewRuler.commentDraftForeground', overviewRulerCommentUnresolvedForeground, nls.localize('editorOverviewRuler.commentDraftForeground', 'Editor overview ruler decoration color for comment threads with draft comments. This color should be opaque.'));
const editorGutterCommentGlyphForeground = registerColor('editorGutter.commentGlyphForeground', { dark: editorForeground, light: editorForeground, hcDark: Color.black, hcLight: Color.white }, nls.localize('editorGutterCommentGlyphForeground', 'Editor gutter decoration color for commenting glyphs.'));
registerColor('editorGutter.commentUnresolvedGlyphForeground', editorGutterCommentGlyphForeground, nls.localize('editorGutterCommentUnresolvedGlyphForeground', 'Editor gutter decoration color for commenting glyphs for unresolved comment threads.'));
@ -65,7 +66,8 @@ export class CommentGlyphWidget extends Disposable {
description: CommentGlyphWidget.description,
isWholeLine: true,
overviewRuler: {
color: themeColorFromId(this._threadState === CommentThreadState.Unresolved ? overviewRulerCommentUnresolvedForeground : overviewRulerCommentForeground),
color: themeColorFromId(this._threadHasDraft ? overviewRulerCommentDraftForeground :
(this._threadState === CommentThreadState.Unresolved ? overviewRulerCommentUnresolvedForeground : overviewRulerCommentForeground)),
position: OverviewRulerLane.Center
},
collapseOnReplaceEdit: true,