@@ -38,8 +38,8 @@ import { IWordAtPosition } from 'vs/editor/common/core/wordHelper';
38
38
import { ClassName } from 'vs/editor/common/model/intervalTree' ;
39
39
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel' ;
40
40
import { IModelContentChangedEvent , IModelDecorationsChangedEvent , IModelLanguageChangedEvent , IModelLanguageConfigurationChangedEvent , IModelOptionsChangedEvent , IModelTokensChangedEvent } from 'vs/editor/common/textModelEvents' ;
41
- import { editorUnnecessaryCodeBorder , editorUnnecessaryCodeOpacity } from 'vs/editor/common/core/editorColorRegistry' ;
42
- import { editorErrorBorder , editorErrorForeground , editorHintBorder , editorHintForeground , editorInfoBorder , editorInfoForeground , editorWarningBorder , editorWarningForeground , editorForeground , editorErrorBackground , editorInfoBackground , editorWarningBackground } from 'vs/platform/theme/common/colorRegistry' ;
41
+ import { editorUnnecessaryCodeOpacity } from 'vs/editor/common/core/editorColorRegistry' ;
42
+ import { editorErrorForeground , editorHintForeground , editorInfoForeground , editorWarningForeground } from 'vs/platform/theme/common/colorRegistry' ;
43
43
import { VerticalRevealType } from 'vs/editor/common/viewEvents' ;
44
44
import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl' ;
45
45
import { ICommandService } from 'vs/platform/commands/common/commands' ;
@@ -2263,64 +2263,24 @@ function getDotDotDotSVGData(color: Color) {
2263
2263
}
2264
2264
2265
2265
registerThemingParticipant ( ( theme , collector ) => {
2266
- const errorBorderColor = theme . getColor ( editorErrorBorder ) ;
2267
- if ( errorBorderColor ) {
2268
- collector . addRule ( `.monaco-editor .${ ClassName . EditorErrorDecoration } { border-bottom: 4px double ${ errorBorderColor } ; }` ) ;
2269
- }
2270
2266
const errorForeground = theme . getColor ( editorErrorForeground ) ;
2271
2267
if ( errorForeground ) {
2272
2268
collector . addRule ( `.monaco-editor .${ ClassName . EditorErrorDecoration } { background: url("data:image/svg+xml,${ getSquigglySVGData ( errorForeground ) } ") repeat-x bottom left; }` ) ;
2273
2269
}
2274
- const errorBackground = theme . getColor ( editorErrorBackground ) ;
2275
- if ( errorBackground ) {
2276
- collector . addRule ( `.monaco-editor .${ ClassName . EditorErrorDecoration } ::before { display: block; content: ''; width: 100%; height: 100%; background: ${ errorBackground } ; }` ) ;
2277
- }
2278
-
2279
- const warningBorderColor = theme . getColor ( editorWarningBorder ) ;
2280
- if ( warningBorderColor ) {
2281
- collector . addRule ( `.monaco-editor .${ ClassName . EditorWarningDecoration } { border-bottom: 4px double ${ warningBorderColor } ; }` ) ;
2282
- }
2283
2270
const warningForeground = theme . getColor ( editorWarningForeground ) ;
2284
2271
if ( warningForeground ) {
2285
2272
collector . addRule ( `.monaco-editor .${ ClassName . EditorWarningDecoration } { background: url("data:image/svg+xml,${ getSquigglySVGData ( warningForeground ) } ") repeat-x bottom left; }` ) ;
2286
2273
}
2287
- const warningBackground = theme . getColor ( editorWarningBackground ) ;
2288
- if ( warningBackground ) {
2289
- collector . addRule ( `.monaco-editor .${ ClassName . EditorWarningDecoration } ::before { display: block; content: ''; width: 100%; height: 100%; background: ${ warningBackground } ; }` ) ;
2290
- }
2291
-
2292
- const infoBorderColor = theme . getColor ( editorInfoBorder ) ;
2293
- if ( infoBorderColor ) {
2294
- collector . addRule ( `.monaco-editor .${ ClassName . EditorInfoDecoration } { border-bottom: 4px double ${ infoBorderColor } ; }` ) ;
2295
- }
2296
2274
const infoForeground = theme . getColor ( editorInfoForeground ) ;
2297
2275
if ( infoForeground ) {
2298
2276
collector . addRule ( `.monaco-editor .${ ClassName . EditorInfoDecoration } { background: url("data:image/svg+xml,${ getSquigglySVGData ( infoForeground ) } ") repeat-x bottom left; }` ) ;
2299
2277
}
2300
- const infoBackground = theme . getColor ( editorInfoBackground ) ;
2301
- if ( infoBackground ) {
2302
- collector . addRule ( `.monaco-editor .${ ClassName . EditorInfoDecoration } ::before { display: block; content: ''; width: 100%; height: 100%; background: ${ infoBackground } ; }` ) ;
2303
- }
2304
-
2305
- const hintBorderColor = theme . getColor ( editorHintBorder ) ;
2306
- if ( hintBorderColor ) {
2307
- collector . addRule ( `.monaco-editor .${ ClassName . EditorHintDecoration } { border-bottom: 2px dotted ${ hintBorderColor } ; }` ) ;
2308
- }
2309
2278
const hintForeground = theme . getColor ( editorHintForeground ) ;
2310
2279
if ( hintForeground ) {
2311
2280
collector . addRule ( `.monaco-editor .${ ClassName . EditorHintDecoration } { background: url("data:image/svg+xml,${ getDotDotDotSVGData ( hintForeground ) } ") no-repeat bottom left; }` ) ;
2312
2281
}
2313
-
2314
2282
const unnecessaryForeground = theme . getColor ( editorUnnecessaryCodeOpacity ) ;
2315
2283
if ( unnecessaryForeground ) {
2316
2284
collector . addRule ( `.monaco-editor.showUnused .${ ClassName . EditorUnnecessaryInlineDecoration } { opacity: ${ unnecessaryForeground . rgba . a } ; }` ) ;
2317
2285
}
2318
-
2319
- const unnecessaryBorder = theme . getColor ( editorUnnecessaryCodeBorder ) ;
2320
- if ( unnecessaryBorder ) {
2321
- collector . addRule ( `.monaco-editor.showUnused .${ ClassName . EditorUnnecessaryDecoration } { border-bottom: 2px dashed ${ unnecessaryBorder } ; }` ) ;
2322
- }
2323
-
2324
- const deprecatedForeground = theme . getColor ( editorForeground ) || 'inherit' ;
2325
- collector . addRule ( `.monaco-editor.showDeprecated .${ ClassName . EditorDeprecatedInlineDecoration } { text-decoration: line-through; text-decoration-color: ${ deprecatedForeground } }` ) ;
2326
2286
} ) ;
0 commit comments