@@ -22,104 +22,13 @@ import { isDefined, isUndefinedOrNull } from 'vs/base/common/types';
2222import 'vs/css!./media/settingsWidgets' ;
2323import { localize } from 'vs/nls' ;
2424import { IContextViewService } from 'vs/platform/contextview/browser/contextView' ;
25- import { foreground , listActiveSelectionBackground , listActiveSelectionForeground , listDropBackground , listHoverBackground , listHoverForeground , listInactiveSelectionBackground , listInactiveSelectionForeground , textLinkActiveForeground , textLinkForeground , textPreformatForeground } from 'vs/platform/theme/common/colorRegistry' ;
2625import { attachButtonStyler , attachInputBoxStyler , attachSelectBoxStyler } from 'vs/platform/theme/common/styler' ;
27- import { IColorTheme , ICssStyleCollector , IThemeService , registerThemingParticipant , ThemeIcon } from 'vs/platform/theme/common/themeService' ;
26+ import { IThemeService , ThemeIcon } from 'vs/platform/theme/common/themeService' ;
2827import { settingsDiscardIcon , settingsEditIcon , settingsRemoveIcon } from 'vs/workbench/contrib/preferences/browser/preferencesIcons' ;
29- import { modifiedItemIndicator , settingsCheckboxBackground , settingsCheckboxBorder , settingsCheckboxForeground , settingsHeaderForeground , settingsSelectBackground , settingsSelectBorder , settingsSelectForeground , settingsSelectListBorder , settingsTextInputBackground , settingsTextInputBorder , settingsTextInputForeground } from 'vs/workbench/contrib/preferences/common/settingsEditorColorRegistry' ;
28+ import { settingsSelectBackground , settingsSelectBorder , settingsSelectForeground , settingsSelectListBorder , settingsTextInputBackground , settingsTextInputBorder , settingsTextInputForeground } from 'vs/workbench/contrib/preferences/common/settingsEditorColorRegistry' ;
3029
3130const $ = DOM . $ ;
3231
33- registerThemingParticipant ( ( theme : IColorTheme , collector : ICssStyleCollector ) => {
34- const checkboxBackgroundColor = theme . getColor ( settingsCheckboxBackground ) ;
35- if ( checkboxBackgroundColor ) {
36- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { background-color: ${ checkboxBackgroundColor } !important; }` ) ;
37- }
38-
39- const checkboxForegroundColor = theme . getColor ( settingsCheckboxForeground ) ;
40- if ( checkboxForegroundColor ) {
41- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { color: ${ checkboxForegroundColor } !important; }` ) ;
42- }
43-
44- const checkboxBorderColor = theme . getColor ( settingsCheckboxBorder ) ;
45- if ( checkboxBorderColor ) {
46- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { border-color: ${ checkboxBorderColor } !important; }` ) ;
47- }
48-
49- const link = theme . getColor ( textLinkForeground ) ;
50- if ( link ) {
51- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a { color: ${ link } ; }` ) ;
52- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a > code { color: ${ link } ; }` ) ;
53- collector . addRule ( `.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a { color: ${ link } ; }` ) ;
54- collector . addRule ( `.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a > code { color: ${ link } ; }` ) ;
55- }
56-
57- const activeLink = theme . getColor ( textLinkActiveForeground ) ;
58- if ( activeLink ) {
59- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:hover, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:active { color: ${ activeLink } ; }` ) ;
60- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:hover > code, .settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:active > code { color: ${ activeLink } ; }` ) ;
61- collector . addRule ( `.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:hover, .monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:active { color: ${ activeLink } ; }` ) ;
62- collector . addRule ( `.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:hover > code, .monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:active > code { color: ${ activeLink } ; }` ) ;
63- }
64-
65- const headerForegroundColor = theme . getColor ( settingsHeaderForeground ) ;
66- if ( headerForegroundColor ) {
67- collector . addRule ( `.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label.checked { color: ${ headerForegroundColor } ; border-bottom-color: ${ headerForegroundColor } ; }` ) ;
68- }
69-
70- const foregroundColor = theme . getColor ( foreground ) ;
71- if ( foregroundColor ) {
72- collector . addRule ( `.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label { color: ${ foregroundColor } ; }` ) ;
73- }
74-
75- // List control
76- const listHoverBackgroundColor = theme . getColor ( listHoverBackground ) ;
77- if ( listHoverBackgroundColor ) {
78- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { background-color: ${ listHoverBackgroundColor } ; }` ) ;
79- }
80-
81- const listHoverForegroundColor = theme . getColor ( listHoverForeground ) ;
82- if ( listHoverForegroundColor ) {
83- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { color: ${ listHoverForegroundColor } ; }` ) ;
84- }
85-
86- const listDropBackgroundColor = theme . getColor ( listDropBackground ) ;
87- if ( listDropBackgroundColor ) {
88- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.drag-hover { background-color: ${ listDropBackgroundColor } ; }` ) ;
89- }
90-
91- const listSelectBackgroundColor = theme . getColor ( listActiveSelectionBackground ) ;
92- if ( listSelectBackgroundColor ) {
93- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { background-color: ${ listSelectBackgroundColor } ; }` ) ;
94- }
95-
96- const listInactiveSelectionBackgroundColor = theme . getColor ( listInactiveSelectionBackground ) ;
97- if ( listInactiveSelectionBackgroundColor ) {
98- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { background-color: ${ listInactiveSelectionBackgroundColor } ; }` ) ;
99- }
100-
101- const listInactiveSelectionForegroundColor = theme . getColor ( listInactiveSelectionForeground ) ;
102- if ( listInactiveSelectionForegroundColor ) {
103- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { color: ${ listInactiveSelectionForegroundColor } ; }` ) ;
104- }
105-
106- const listSelectForegroundColor = theme . getColor ( listActiveSelectionForeground ) ;
107- if ( listSelectForegroundColor ) {
108- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { color: ${ listSelectForegroundColor } ; }` ) ;
109- }
110-
111- const codeTextForegroundColor = theme . getColor ( textPreformatForeground ) ;
112- if ( codeTextForegroundColor ) {
113- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item .setting-item-markdown code { color: ${ codeTextForegroundColor } }` ) ;
114- collector . addRule ( `.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown code { color: ${ codeTextForegroundColor } }` ) ;
115- }
116-
117- const modifiedItemIndicatorColor = theme . getColor ( modifiedItemIndicator ) ;
118- if ( modifiedItemIndicatorColor ) {
119- collector . addRule ( `.settings-editor > .settings-body .settings-tree-container .setting-item-contents > .setting-item-modified-indicator { border-color: ${ modifiedItemIndicatorColor } ; }` ) ;
120- }
121- } ) ;
122-
12332type EditKey = 'none' | 'create' | number ;
12433
12534type RowElementGroup = {
0 commit comments