Lighten colors used for inline notebook buttons in dark themes. (#7230)

This commit is contained in:
Cory Rivera
2019-09-16 15:27:56 -07:00
committed by GitHub
parent 7868afb4fd
commit 6f06c18014

View File

@@ -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};
}
`);
}