@@ -16,7 +16,6 @@ import { ISashEvent, IVerticalSashLayoutProvider, Orientation, Sash } from 'vs/b
16
16
import { Widget } from 'vs/base/browser/ui/widget' ;
17
17
import { Delayer } from 'vs/base/common/async' ;
18
18
import { Codicon } from 'vs/base/common/codicons' ;
19
- import { Color } from 'vs/base/common/color' ;
20
19
import { onUnexpectedError } from 'vs/base/common/errors' ;
21
20
import { KeyCode , KeyMod } from 'vs/base/common/keyCodes' ;
22
21
import { toDisposable } from 'vs/base/common/lifecycle' ;
@@ -36,7 +35,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c
36
35
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
37
36
import { INotificationService } from 'vs/platform/notification/common/notification' ;
38
37
import { IStorageService , StorageScope , StorageTarget } from 'vs/platform/storage/common/storage' ;
39
- import { asCssVariable , contrastBorder , editorFindMatch , editorFindMatchBorder , editorFindMatchHighlight , editorFindMatchHighlightBorder , editorFindRangeHighlight , editorFindRangeHighlightBorder , editorWidgetBackground , editorWidgetBorder , editorWidgetForeground , editorWidgetResizeBorder , errorForeground , focusBorder , inputActiveOptionBackground , inputActiveOptionBorder , inputActiveOptionForeground , toolbarHoverBackground , widgetBorder , widgetShadow } from 'vs/platform/theme/common/colorRegistry' ;
38
+ import { asCssVariable , editorFindMatchHighlightBorder , editorFindRangeHighlightBorder , inputActiveOptionBackground , inputActiveOptionBorder , inputActiveOptionForeground } from 'vs/platform/theme/common/colorRegistry' ;
40
39
import { registerIcon , widgetClose } from 'vs/platform/theme/common/iconRegistry' ;
41
40
import { IThemeService , registerThemingParticipant } from 'vs/platform/theme/common/themeService' ;
42
41
import { ThemeIcon } from 'vs/base/common/themables' ;
@@ -1376,84 +1375,13 @@ export class SimpleButton extends Widget {
1376
1375
// theming
1377
1376
1378
1377
registerThemingParticipant ( ( theme , collector ) => {
1379
- const addBackgroundColorRule = ( selector : string , color : Color | undefined ) : void => {
1380
- if ( color ) {
1381
- collector . addRule ( `.monaco-editor ${ selector } { background-color: ${ color } ; }` ) ;
1382
- }
1383
- } ;
1384
-
1385
- addBackgroundColorRule ( '.findMatch' , theme . getColor ( editorFindMatchHighlight ) ) ;
1386
- addBackgroundColorRule ( '.currentFindMatch' , theme . getColor ( editorFindMatch ) ) ;
1387
- addBackgroundColorRule ( '.findScope' , theme . getColor ( editorFindRangeHighlight ) ) ;
1388
-
1389
- const widgetBackground = theme . getColor ( editorWidgetBackground ) ;
1390
- addBackgroundColorRule ( '.find-widget' , widgetBackground ) ;
1391
-
1392
- const widgetShadowColor = theme . getColor ( widgetShadow ) ;
1393
- if ( widgetShadowColor ) {
1394
- collector . addRule ( `.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${ widgetShadowColor } ; }` ) ;
1395
- }
1396
-
1397
- const widgetBorderColor = theme . getColor ( widgetBorder ) ;
1398
- if ( widgetBorderColor ) {
1399
- collector . addRule ( `.monaco-editor .find-widget { border-left: 1px solid ${ widgetBorderColor } ; border-right: 1px solid ${ widgetBorderColor } ; border-bottom: 1px solid ${ widgetBorderColor } ; }` ) ;
1400
- }
1401
-
1402
1378
const findMatchHighlightBorder = theme . getColor ( editorFindMatchHighlightBorder ) ;
1403
1379
if ( findMatchHighlightBorder ) {
1404
1380
collector . addRule ( `.monaco-editor .findMatch { border: 1px ${ isHighContrast ( theme . type ) ? 'dotted' : 'solid' } ${ findMatchHighlightBorder } ; box-sizing: border-box; }` ) ;
1405
1381
}
1406
1382
1407
- const findMatchBorder = theme . getColor ( editorFindMatchBorder ) ;
1408
- if ( findMatchBorder ) {
1409
- collector . addRule ( `.monaco-editor .currentFindMatch { border: 2px solid ${ findMatchBorder } ; padding: 1px; box-sizing: border-box; }` ) ;
1410
- }
1411
-
1412
1383
const findRangeHighlightBorder = theme . getColor ( editorFindRangeHighlightBorder ) ;
1413
1384
if ( findRangeHighlightBorder ) {
1414
1385
collector . addRule ( `.monaco-editor .findScope { border: 1px ${ isHighContrast ( theme . type ) ? 'dashed' : 'solid' } ${ findRangeHighlightBorder } ; }` ) ;
1415
1386
}
1416
-
1417
- const hcBorder = theme . getColor ( contrastBorder ) ;
1418
- if ( hcBorder ) {
1419
- collector . addRule ( `.monaco-editor .find-widget { border: 1px solid ${ hcBorder } ; }` ) ;
1420
- }
1421
-
1422
- const foreground = theme . getColor ( editorWidgetForeground ) ;
1423
- if ( foreground ) {
1424
- collector . addRule ( `.monaco-editor .find-widget { color: ${ foreground } ; }` ) ;
1425
- }
1426
-
1427
- const error = theme . getColor ( errorForeground ) ;
1428
- if ( error ) {
1429
- collector . addRule ( `.monaco-editor .find-widget.no-results .matchesCount { color: ${ error } ; }` ) ;
1430
- }
1431
-
1432
- const resizeBorderBackground = theme . getColor ( editorWidgetResizeBorder ) ;
1433
- if ( resizeBorderBackground ) {
1434
- collector . addRule ( `.monaco-editor .find-widget .monaco-sash { background-color: ${ resizeBorderBackground } ; }` ) ;
1435
- } else {
1436
- const border = theme . getColor ( editorWidgetBorder ) ;
1437
- if ( border ) {
1438
- collector . addRule ( `.monaco-editor .find-widget .monaco-sash { background-color: ${ border } ; }` ) ;
1439
- }
1440
- }
1441
-
1442
- // Action bars
1443
- const toolbarHoverBackgroundColor = theme . getColor ( toolbarHoverBackground ) ;
1444
- if ( toolbarHoverBackgroundColor ) {
1445
- collector . addRule ( `
1446
- .monaco-editor .find-widget .button:not(.disabled):hover,
1447
- .monaco-editor .find-widget .codicon-find-selection:hover {
1448
- background-color: ${ toolbarHoverBackgroundColor } !important;
1449
- }
1450
- ` ) ;
1451
- }
1452
-
1453
- // This rule is used to override the outline color for synthetic-focus find input.
1454
- const focusOutline = theme . getColor ( focusBorder ) ;
1455
- if ( focusOutline ) {
1456
- collector . addRule ( `.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${ focusOutline } ; }` ) ;
1457
-
1458
- }
1459
1387
} ) ;
0 commit comments