Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce theme participant for notebook #165214

Merged
merged 4 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
padding:0 var(--notebook-find-horizontal-padding);
transition: top 200ms linear;
visibility: hidden;
background-color: var(--vscode-editorWidget-background) !important;
color: var(--vscode-editorWidget-foreground);
box-shadow: 0 0 8px 2px var(--vscode-widget-shadow);
}

.monaco-workbench.reduce-motion .simple-fr-find-part-wrapper {
Expand Down Expand Up @@ -154,10 +157,17 @@
padding: 2px;
}

.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked {
border-color: var(--vscode-inputOption-activeBorder);
color: var(--vscode-inputOption-activeForeground);
background-color: var(--vscode-inputOption-activeBackground);
}

.monaco-workbench .simple-fr-find-part .monaco-inputbox > .ibwrapper > .input,
.monaco-workbench .simple-fr-replace-part .monaco-inputbox > .ibwrapper > .input {
height: 24px;
}
.monaco-workbench .simple-fr-find-part-wrapper .monaco-sash {
left: 0 !important;
background-color: var(--vscode-editorWidget-resizeBorder, var(--vscode-editorWidget-border));
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as nls from 'vs/nls';
import { ContextScopedReplaceInput, registerAndCreateHistoryNavigationContext } from 'vs/platform/history/browser/contextScopedHistoryWidget';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { editorWidgetBackground, editorWidgetBorder, editorWidgetForeground, editorWidgetResizeBorder, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
import { inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground } from 'vs/platform/theme/common/colorRegistry';
import { registerIcon, widgetClose } from 'vs/platform/theme/common/iconRegistry';
import { attachProgressBarStyler } from 'vs/platform/theme/common/styler';
import { IColorTheme, IThemeService, registerThemingParticipant, ThemeIcon } from 'vs/platform/theme/common/themeService';
Expand Down Expand Up @@ -766,39 +766,6 @@ export abstract class SimpleFindReplaceWidget extends Widget {

// theming
registerThemingParticipant((theme, collector) => {
const findWidgetBGColor = theme.getColor(editorWidgetBackground);
if (findWidgetBGColor) {
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { background-color: ${findWidgetBGColor} !important; }`);
}

const widgetForeground = theme.getColor(editorWidgetForeground);
if (widgetForeground) {
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { color: ${widgetForeground}; }`);
}

const widgetShadowColor = theme.getColor(widgetShadow);
if (widgetShadowColor) {
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { box-shadow: 0 0 8px 2px ${widgetShadowColor}; }`);
}

const inputActiveOptionBorderColor = theme.getColor(inputActiveOptionBorder);
if (inputActiveOptionBorderColor) {
collector.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { border-color: ${inputActiveOptionBorderColor}; }`);
}
const inputActiveOptionForegroundColor = theme.getColor(inputActiveOptionForeground);
if (inputActiveOptionForegroundColor) {
collector.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { color: ${inputActiveOptionForegroundColor}; }`);
}
const inputActiveOptionBackgroundColor = theme.getColor(inputActiveOptionBackground);
if (inputActiveOptionBackgroundColor) {
collector.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { background-color: ${inputActiveOptionBackgroundColor}; }`);
}

const resizeBorderBackground = theme.getColor(editorWidgetResizeBorder) ?? theme.getColor(editorWidgetBorder);
if (resizeBorderBackground) {
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper .monaco-sash { background-color: ${resizeBorderBackground}; }`);
}

collector.addRule(`
:root {
--notebook-find-width: ${NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH}px;
Expand Down
84 changes: 84 additions & 0 deletions src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,87 @@
.notebook-text-diff-editor .notebook-overview-ruler-container .diffViewport {
z-index: var(--notebook-diff-view-viewport-slider);
}

.notebook-text-diff-editor .diffViewport {
background: var(--vscode-scrollbarSlider-background);
}

.notebook-text-diff-editor .diffViewport:hover {
background: var(--vscode-scrollbarSlider-hoverBackground);
}

.notebook-text-diff-editor .diffViewport:active {
background: var(--vscode-scrollbarSlider-activeBackground);
}

/** Diff cell borders */
.notebook-text-diff-editor .cell-body .border-container .top-border,
.notebook-text-diff-editor .cell-body .border-container .bottom-border,
.notebook-text-diff-editor .cell-diff-editor-container .output-header-container,
.notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container {
border-top: 1px solid var(--vscode-notebook-cellBorderColor);
}

.notebook-text-diff-editor .cell-body .border-container .left-border {
border-left: 1px solid var(--vscode-notebook-cellBorderColor);
}

.notebook-text-diff-editor .cell-body .border-container .right-border {
border-right: 1px solid var(--vscode-notebook-cellBorderColor);
}

/** Diff cell active borders */
.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .top-border,
.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .bottom-border {
border-top: 1px solid var(--vscode-notebook-focusedEditorBorder);
}

.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .left-border {
border-left: 1px solid var(--vscode-notebook-focusedEditorBorder);
}

.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .right-border {
border-right: 1px solid var(--vscode-notebook-focusedEditorBorder);
}

/** Diff cell diff background */

.monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-right div.foreground,
.monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.foreground,
.monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.output-empty-view,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .margin,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .monaco-editor-background,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .margin,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .monaco-editor-background,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .margin,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .monaco-editor-background,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-header-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-header-container {
background-color: var(--vscode-diffEditor-insertedTextBackground);
}

.monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-left div.foreground,
.monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.foreground,
.monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.output-empty-view,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .margin,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .monaco-editor-background,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .margin,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .monaco-editor-background,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .margin,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .monaco-editor-background,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-header-container,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-header-container {
background-color: var(--vscode-diffEditor-removedTextBackground);
}

/** Diff cell editor background */
.notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .margin,
.notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .monaco-editor-background {
background: var(--vscode-notebook-cellEditorBackground, var(--vscode-editor-background));
}
Loading