@@ -9,15 +9,15 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
9
9
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
10
10
import { IThemeService , registerThemingParticipant } from 'vs/platform/theme/common/themeService' ;
11
11
import { EditorPaneSelectionChangeReason , EditorPaneSelectionCompareResult , IEditorOpenContext , IEditorPaneSelection , IEditorPaneSelectionChangeEvent , IEditorPaneWithSelection } from 'vs/workbench/common/editor' ;
12
- import { cellEditorBackground , focusedEditorBorderColor , getDefaultNotebookCreationOptions , notebookCellBorder , NotebookEditorWidget } from 'vs/workbench/contrib/notebook/browser/notebookEditorWidget' ;
12
+ import { getDefaultNotebookCreationOptions , NotebookEditorWidget } from 'vs/workbench/contrib/notebook/browser/notebookEditorWidget' ;
13
13
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService' ;
14
14
import { NotebookDiffEditorInput } from '../../common/notebookDiffEditorInput' ;
15
15
import { CancellationToken , CancellationTokenSource } from 'vs/base/common/cancellation' ;
16
16
import { DiffElementViewModelBase , SideBySideDiffElementViewModel , SingleSideDiffElementViewModel } from 'vs/workbench/contrib/notebook/browser/diff/diffElementViewModel' ;
17
17
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
18
18
import { CellDiffSideBySideRenderer , CellDiffSingleSideRenderer , NotebookCellTextDiffListDelegate , NotebookTextDiffList } from 'vs/workbench/contrib/notebook/browser/diff/notebookDiffList' ;
19
19
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey' ;
20
- import { diffDiagonalFill , diffInserted , diffRemoved , editorBackground , focusBorder , foreground } from 'vs/platform/theme/common/colorRegistry' ;
20
+ import { diffDiagonalFill , editorBackground , focusBorder , foreground } from 'vs/platform/theme/common/colorRegistry' ;
21
21
import { INotebookEditorWorkerService } from 'vs/workbench/contrib/notebook/common/services/notebookWorkerService' ;
22
22
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
23
23
import { IEditorOptions as ICodeEditorOptions } from 'vs/editor/common/config/editorOptions' ;
@@ -1023,27 +1023,6 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD
1023
1023
registerZIndex ( ZIndex . Base , 10 , 'notebook-diff-view-viewport-slider' ) ;
1024
1024
1025
1025
registerThemingParticipant ( ( theme , collector ) => {
1026
- const cellBorderColor = theme . getColor ( notebookCellBorder ) ;
1027
- if ( cellBorderColor ) {
1028
- collector . addRule ( `.notebook-text-diff-editor .cell-body .border-container .top-border { border-top: 1px solid ${ cellBorderColor } ;}` ) ;
1029
- collector . addRule ( `.notebook-text-diff-editor .cell-body .border-container .bottom-border { border-top: 1px solid ${ cellBorderColor } ;}` ) ;
1030
- collector . addRule ( `.notebook-text-diff-editor .cell-body .border-container .left-border { border-left: 1px solid ${ cellBorderColor } ;}` ) ;
1031
- collector . addRule ( `.notebook-text-diff-editor .cell-body .border-container .right-border { border-right: 1px solid ${ cellBorderColor } ;}` ) ;
1032
- collector . addRule ( `.notebook-text-diff-editor .cell-diff-editor-container .output-header-container,
1033
- .notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container {
1034
- border-top: 1px solid ${ cellBorderColor } ;
1035
- }` ) ;
1036
- }
1037
-
1038
- const focusCellBackgroundColor = theme . getColor ( focusedEditorBorderColor ) ;
1039
-
1040
- if ( focusCellBackgroundColor ) {
1041
- collector . addRule ( `.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .top-border { border-top: 1px solid ${ focusCellBackgroundColor } ;}` ) ;
1042
- collector . addRule ( `.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .bottom-border { border-top: 1px solid ${ focusCellBackgroundColor } ;}` ) ;
1043
- collector . addRule ( `.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .left-border { border-left: 1px solid ${ focusCellBackgroundColor } ;}` ) ;
1044
- collector . addRule ( `.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .right-border { border-right: 1px solid ${ focusCellBackgroundColor } ;}` ) ;
1045
- }
1046
-
1047
1026
const diffDiagonalFillColor = theme . getColor ( diffDiagonalFill ) ;
1048
1027
collector . addRule ( `
1049
1028
.notebook-text-diff-editor .diagonal-fill {
@@ -1058,102 +1037,5 @@ registerThemingParticipant((theme, collector) => {
1058
1037
}
1059
1038
` ) ;
1060
1039
1061
- const editorBackgroundColor = theme . getColor ( cellEditorBackground ) ?? theme . getColor ( editorBackground ) ;
1062
- if ( editorBackgroundColor ) {
1063
- collector . addRule ( `.notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .margin,
1064
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container .source-container .monaco-editor .monaco-editor-background { background: ${ editorBackgroundColor } ; }`
1065
- ) ;
1066
- }
1067
-
1068
- const added = theme . getColor ( diffInserted ) ;
1069
- if ( added ) {
1070
- collector . addRule (
1071
- `
1072
- .monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-right div.foreground { background-color: ${ added } ; }
1073
- .monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.foreground { background-color: ${ added } ; }
1074
- .monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.output-empty-view { background-color: ${ added } ; }
1075
- `
1076
- ) ;
1077
- collector . addRule ( `
1078
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container { background-color: ${ added } ; }
1079
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .margin,
1080
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container .monaco-editor .monaco-editor-background {
1081
- background-color: ${ added } ;
1082
- }
1083
- `
1084
- ) ;
1085
- collector . addRule ( `
1086
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container { background-color: ${ added } ; }
1087
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .margin,
1088
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container .monaco-editor .monaco-editor-background {
1089
- background-color: ${ added } ;
1090
- }
1091
- `
1092
- ) ;
1093
- collector . addRule ( `
1094
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container { background-color: ${ added } ; }
1095
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .margin,
1096
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container .monaco-editor .monaco-editor-background {
1097
- background-color: ${ added } ;
1098
- }
1099
- `
1100
- ) ;
1101
- collector . addRule ( `
1102
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-header-container { background-color: ${ added } ; }
1103
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-header-container { background-color: ${ added } ; }
1104
- `
1105
- ) ;
1106
- }
1107
- const removed = theme . getColor ( diffRemoved ) ;
1108
- if ( removed ) {
1109
- collector . addRule (
1110
- `
1111
- .monaco-workbench .notebook-text-diff-editor .cell-body.full .output-info-container.modified .output-view-container .output-view-container-left div.foreground { background-color: ${ removed } ; }
1112
- .monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.foreground { background-color: ${ removed } ; }
1113
- .monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.output-empty-view { background-color: ${ removed } ; }
1114
-
1115
- `
1116
- ) ;
1117
- collector . addRule ( `
1118
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container { background-color: ${ removed } ; }
1119
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .margin,
1120
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container .monaco-editor .monaco-editor-background {
1121
- background-color: ${ removed } ;
1122
- }
1123
- `
1124
- ) ;
1125
- collector . addRule ( `
1126
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container { background-color: ${ removed } ; }
1127
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .margin,
1128
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container .monaco-editor .monaco-editor-background {
1129
- background-color: ${ removed } ;
1130
- }
1131
- `
1132
- ) ;
1133
- collector . addRule ( `
1134
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container { background-color: ${ removed } ; }
1135
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .margin,
1136
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container .monaco-editor .monaco-editor-background {
1137
- background-color: ${ removed } ;
1138
- }
1139
- `
1140
- ) ;
1141
- collector . addRule ( `
1142
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-header-container { background-color: ${ removed } ; }
1143
- .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-header-container { background-color: ${ removed } ; }
1144
- `
1145
- ) ;
1146
- }
1147
-
1148
- // const changed = theme.getColor(editorGutterModifiedBackground);
1149
-
1150
- // if (changed) {
1151
- // collector.addRule(`
1152
- // .notebook-text-diff-editor .cell-diff-editor-container .metadata-header-container.modified {
1153
- // background-color: ${changed};
1154
- // }
1155
- // `);
1156
- // }
1157
-
1158
1040
collector . addRule ( `.notebook-text-diff-editor .cell-body { margin: ${ DIFF_CELL_MARGIN } px; }` ) ;
1159
1041
} ) ;
0 commit comments