Skip to content

Commit 3ad328c

Browse files
authored
Merge pull request microsoft#165214 from microsoft/rebornix/disturbed-cobra
Reduce theme participant for notebook
2 parents 28cf111 + 55a95c7 commit 3ad328c

File tree

9 files changed

+126
-225
lines changed

9 files changed

+126
-225
lines changed

src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
padding:0 var(--notebook-find-horizontal-padding);
1515
transition: top 200ms linear;
1616
visibility: hidden;
17+
background-color: var(--vscode-editorWidget-background) !important;
18+
color: var(--vscode-editorWidget-foreground);
19+
box-shadow: 0 0 8px 2px var(--vscode-widget-shadow);
1720
}
1821

1922
.monaco-workbench.reduce-motion .simple-fr-find-part-wrapper {
@@ -154,10 +157,17 @@
154157
padding: 2px;
155158
}
156159

160+
.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked {
161+
border-color: var(--vscode-inputOption-activeBorder);
162+
color: var(--vscode-inputOption-activeForeground);
163+
background-color: var(--vscode-inputOption-activeBackground);
164+
}
165+
157166
.monaco-workbench .simple-fr-find-part .monaco-inputbox > .ibwrapper > .input,
158167
.monaco-workbench .simple-fr-replace-part .monaco-inputbox > .ibwrapper > .input {
159168
height: 24px;
160169
}
161170
.monaco-workbench .simple-fr-find-part-wrapper .monaco-sash {
162171
left: 0 !important;
172+
background-color: var(--vscode-editorWidget-resizeBorder, var(--vscode-editorWidget-border));
163173
}

src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.ts

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import * as nls from 'vs/nls';
1818
import { ContextScopedReplaceInput, registerAndCreateHistoryNavigationContext } from 'vs/platform/history/browser/contextScopedHistoryWidget';
1919
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
2020
import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView';
21-
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';
21+
import { inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground } from 'vs/platform/theme/common/colorRegistry';
2222
import { registerIcon, widgetClose } from 'vs/platform/theme/common/iconRegistry';
2323
import { attachProgressBarStyler } from 'vs/platform/theme/common/styler';
2424
import { IColorTheme, IThemeService, registerThemingParticipant, ThemeIcon } from 'vs/platform/theme/common/themeService';
@@ -766,39 +766,6 @@ export abstract class SimpleFindReplaceWidget extends Widget {
766766

767767
// theming
768768
registerThemingParticipant((theme, collector) => {
769-
const findWidgetBGColor = theme.getColor(editorWidgetBackground);
770-
if (findWidgetBGColor) {
771-
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { background-color: ${findWidgetBGColor} !important; }`);
772-
}
773-
774-
const widgetForeground = theme.getColor(editorWidgetForeground);
775-
if (widgetForeground) {
776-
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { color: ${widgetForeground}; }`);
777-
}
778-
779-
const widgetShadowColor = theme.getColor(widgetShadow);
780-
if (widgetShadowColor) {
781-
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { box-shadow: 0 0 8px 2px ${widgetShadowColor}; }`);
782-
}
783-
784-
const inputActiveOptionBorderColor = theme.getColor(inputActiveOptionBorder);
785-
if (inputActiveOptionBorderColor) {
786-
collector.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { border-color: ${inputActiveOptionBorderColor}; }`);
787-
}
788-
const inputActiveOptionForegroundColor = theme.getColor(inputActiveOptionForeground);
789-
if (inputActiveOptionForegroundColor) {
790-
collector.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { color: ${inputActiveOptionForegroundColor}; }`);
791-
}
792-
const inputActiveOptionBackgroundColor = theme.getColor(inputActiveOptionBackground);
793-
if (inputActiveOptionBackgroundColor) {
794-
collector.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { background-color: ${inputActiveOptionBackgroundColor}; }`);
795-
}
796-
797-
const resizeBorderBackground = theme.getColor(editorWidgetResizeBorder) ?? theme.getColor(editorWidgetBorder);
798-
if (resizeBorderBackground) {
799-
collector.addRule(`.monaco-workbench .simple-fr-find-part-wrapper .monaco-sash { background-color: ${resizeBorderBackground}; }`);
800-
}
801-
802769
collector.addRule(`
803770
:root {
804771
--notebook-find-width: ${NOTEBOOK_FIND_WIDGET_INITIAL_WIDTH}px;

src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,87 @@
306306
.notebook-text-diff-editor .notebook-overview-ruler-container .diffViewport {
307307
z-index: var(--notebook-diff-view-viewport-slider);
308308
}
309+
310+
.notebook-text-diff-editor .diffViewport {
311+
background: var(--vscode-scrollbarSlider-background);
312+
}
313+
314+
.notebook-text-diff-editor .diffViewport:hover {
315+
background: var(--vscode-scrollbarSlider-hoverBackground);
316+
}
317+
318+
.notebook-text-diff-editor .diffViewport:active {
319+
background: var(--vscode-scrollbarSlider-activeBackground);
320+
}
321+
322+
/** Diff cell borders */
323+
.notebook-text-diff-editor .cell-body .border-container .top-border,
324+
.notebook-text-diff-editor .cell-body .border-container .bottom-border,
325+
.notebook-text-diff-editor .cell-diff-editor-container .output-header-container,
326+
.notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container {
327+
border-top: 1px solid var(--vscode-notebook-cellBorderColor);
328+
}
329+
330+
.notebook-text-diff-editor .cell-body .border-container .left-border {
331+
border-left: 1px solid var(--vscode-notebook-cellBorderColor);
332+
}
333+
334+
.notebook-text-diff-editor .cell-body .border-container .right-border {
335+
border-right: 1px solid var(--vscode-notebook-cellBorderColor);
336+
}
337+
338+
/** Diff cell active borders */
339+
.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .top-border,
340+
.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .bottom-border {
341+
border-top: 1px solid var(--vscode-notebook-focusedEditorBorder);
342+
}
343+
344+
.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .left-border {
345+
border-left: 1px solid var(--vscode-notebook-focusedEditorBorder);
346+
}
347+
348+
.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .right-border {
349+
border-right: 1px solid var(--vscode-notebook-focusedEditorBorder);
350+
}
351+
352+
/** Diff cell diff background */
353+
354+
.monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-right div.foreground,
355+
.monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.foreground,
356+
.monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.output-empty-view,
357+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container,
358+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .margin,
359+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .monaco-editor-background,
360+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container,
361+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .margin,
362+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .monaco-editor-background,
363+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container,
364+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .margin,
365+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .monaco-editor-background,
366+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-header-container,
367+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-header-container {
368+
background-color: var(--vscode-diffEditor-insertedTextBackground);
369+
}
370+
371+
.monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-left div.foreground,
372+
.monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.foreground,
373+
.monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.output-empty-view,
374+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container,
375+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .margin,
376+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .monaco-editor-background,
377+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container,
378+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .margin,
379+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .monaco-editor-background,
380+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container,
381+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .margin,
382+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .monaco-editor-background,
383+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-header-container,
384+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-header-container {
385+
background-color: var(--vscode-diffEditor-removedTextBackground);
386+
}
387+
388+
/** Diff cell editor background */
389+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .margin,
390+
.notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .monaco-editor-background {
391+
background: var(--vscode-notebook-cellEditorBackground, var(--vscode-editor-background));
392+
}

0 commit comments

Comments
 (0)