Skip to content

Commit

Permalink
chore: rename color var for comment input box
Browse files Browse the repository at this point in the history
also change the default color to inherit from input.background
  • Loading branch information
d-mahard committed Nov 11, 2023
1 parent 55c1e84 commit 5da11da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/lib/stylelint/vscode-known-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"--vscode-editorCodeLens-foreground",
"--vscode-editorCommentsWidget-rangeActiveBackground",
"--vscode-editorCommentsWidget-rangeBackground",
"--vscode-editorCommentsWidget-replyButtonBackground",
"--vscode-editorCommentsWidget-replyInputBackground",
"--vscode-editorCommentsWidget-resolvedBorder",
"--vscode-editorCommentsWidget-unresolvedBorder",
"--vscode-editorCursor-background",
Expand Down
5 changes: 2 additions & 3 deletions src/vs/workbench/contrib/comments/browser/commentColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@

import { Color } from 'vs/base/common/color';
import * as languages from 'vs/editor/common/languages';
import { peekViewTitleBackground } from 'vs/editor/contrib/peekView/browser/peekView';
import * as nls from 'vs/nls';
import { contrastBorder, disabledForeground, listFocusOutline, registerColor, transparent } from 'vs/platform/theme/common/colorRegistry';
import { contrastBorder, disabledForeground, inputBackground, listFocusOutline, registerColor, transparent } from 'vs/platform/theme/common/colorRegistry';
import { IColorTheme } from 'vs/platform/theme/common/themeService';

const resolvedCommentViewIcon = registerColor('commentsView.resolvedIcon', { dark: disabledForeground, light: disabledForeground, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('resolvedCommentIcon', 'Icon color for resolved comments.'));
const unresolvedCommentViewIcon = registerColor('commentsView.unresolvedIcon', { dark: listFocusOutline, light: listFocusOutline, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('unresolvedCommentIcon', 'Icon color for unresolved comments.'));

registerColor('editorCommentsWidget.replyButtonBackground', { dark: peekViewTitleBackground, light: peekViewTitleBackground, hcDark: peekViewTitleBackground, hcLight: peekViewTitleBackground }, nls.localize('commentReplyButtonBackground', 'Background color for comment reply button.'));
registerColor('editorCommentsWidget.replyInputBackground', { dark: inputBackground, light: inputBackground, hcDark: inputBackground, hcLight: inputBackground }, nls.localize('commentReplyInputBackground', 'Background color for comment reply input box.'));
const resolvedCommentBorder = registerColor('editorCommentsWidget.resolvedBorder', { dark: resolvedCommentViewIcon, light: resolvedCommentViewIcon, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('resolvedCommentBorder', 'Color of borders and arrow for resolved comments.'));
const unresolvedCommentBorder = registerColor('editorCommentsWidget.unresolvedBorder', { dark: unresolvedCommentViewIcon, light: unresolvedCommentViewIcon, hcDark: contrastBorder, hcLight: contrastBorder }, nls.localize('unresolvedCommentBorder', 'Color of borders and arrow for unresolved comments.'));
export const commentThreadRangeBackground = registerColor('editorCommentsWidget.rangeBackground', { dark: transparent(unresolvedCommentBorder, .1), light: transparent(unresolvedCommentBorder, .1), hcDark: transparent(unresolvedCommentBorder, .1), hcLight: transparent(unresolvedCommentBorder, .1) }, nls.localize('commentThreadRangeBackground', 'Color of background for comment ranges.'));
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/comments/browser/media/review.css
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
white-space: nowrap;
border: 0px;
outline: 1px solid transparent;
background-color: var(--vscode-editorCommentsWidget-replyButtonBackground);
background-color: var(--vscode-editorCommentsWidget-replyInputBackground);
color: var(--vscode-editor-foreground);
font-size: inherit;
font-family: var(--monaco-monospace-font);
Expand Down

0 comments on commit 5da11da

Please sign in to comment.