From 6f06c1801493c5ae4abdb2d237842043cf2000f1 Mon Sep 17 00:00:00 2001 From: Cory Rivera Date: Mon, 16 Sep 2019 15:27:56 -0700 Subject: [PATCH] Lighten colors used for inline notebook buttons in dark themes. (#7230) --- .../parts/notebook/browser/notebookStyles.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/parts/notebook/browser/notebookStyles.ts b/src/sql/workbench/parts/notebook/browser/notebookStyles.ts index ded4e70818..8042c2ded9 100644 --- a/src/sql/workbench/parts/notebook/browser/notebookStyles.ts +++ b/src/sql/workbench/parts/notebook/browser/notebookStyles.ts @@ -6,7 +6,7 @@ import 'vs/css!./notebook'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { SIDE_BAR_BACKGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BACKGROUND } from 'vs/workbench/common/theme'; -import { activeContrastBorder, contrastBorder, buttonBackground, textLinkForeground, textLinkActiveForeground, textPreformatForeground, textBlockQuoteBackground, textBlockQuoteBorder, buttonForeground, editorForeground, editorBackground } from 'vs/platform/theme/common/colorRegistry'; +import { activeContrastBorder, contrastBorder, buttonBackground, textLinkForeground, textLinkActiveForeground, textPreformatForeground, textBlockQuoteBackground, textBlockQuoteBorder, buttonForeground, editorBackground, lighten } from 'vs/platform/theme/common/colorRegistry'; import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -38,6 +38,7 @@ export function registerNotebookThemes(overrideEditorThemeSetting: boolean, conf } if (buttonBackgroundColor) { + let lighterBackgroundColor = lighten(buttonBackgroundColor, 0.825)(theme); collector.addRule(` .notebookEditor .notebook-cell.active { border-color: ${buttonBackgroundColor}; @@ -57,6 +58,17 @@ export function registerNotebookThemes(overrideEditorThemeSetting: boolean, conf .notebookEditor .hoverButton { color: ${buttonBackgroundColor}; } + + .vs-dark .notebookEditor .hoverButton { + border-color: ${lighterBackgroundColor}; + } + .vs-dark .notebookEditor .hoverButton:active, + .vs-dark .notebookEditor .hoverButton:hover { + background-color: ${lighterBackgroundColor}; + } + .vs-dark .notebookEditor .hoverButton { + color: ${lighterBackgroundColor}; + } `); }