@@ -29,7 +29,7 @@ import { IListContextMenuEvent } from 'vs/base/browser/ui/list/list';
29
29
import { IThemeService , registerThemingParticipant , IColorTheme , ICssStyleCollector , ThemeIcon } from 'vs/platform/theme/common/themeService' ;
30
30
import { IContextKeyService , IContextKey , ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
31
31
import { KeyCode } from 'vs/base/common/keyCodes' ;
32
- import { listHighlightForeground , badgeBackground , contrastBorder , badgeForeground , listActiveSelectionForeground , listInactiveSelectionForeground , listHoverForeground , listFocusForeground , editorBackground , foreground , listActiveSelectionBackground , listInactiveSelectionBackground , listFocusBackground , listHoverBackground , registerColor , tableOddRowsBackgroundColor } from 'vs/platform/theme/common/colorRegistry' ;
32
+ import { badgeBackground , contrastBorder , badgeForeground , listActiveSelectionForeground , listInactiveSelectionForeground , listHoverForeground , listFocusForeground , editorBackground , foreground , listActiveSelectionBackground , listInactiveSelectionBackground , listFocusBackground , listHoverBackground , registerColor , tableOddRowsBackgroundColor } from 'vs/platform/theme/common/colorRegistry' ;
33
33
import { IEditorService } from 'vs/workbench/services/editor/common/editorService' ;
34
34
import { EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions' ;
35
35
import { WorkbenchTable } from 'vs/platform/list/browser/listService' ;
@@ -1140,26 +1140,12 @@ class AccessibilityProvider implements IListAccessibilityProvider<IKeybindingIte
1140
1140
ariaLabel += ', ' + keybindingItemEntry . keybindingItem . when ? keybindingItemEntry . keybindingItem . when : localize ( 'noWhen' , "No when context." ) ;
1141
1141
return ariaLabel ;
1142
1142
}
1143
-
1144
1143
}
1145
1144
1146
- const keybindingTableHeader = registerColor ( 'keybindingTable.headerBackground' , { dark : tableOddRowsBackgroundColor , light : tableOddRowsBackgroundColor , hcDark : tableOddRowsBackgroundColor , hcLight : tableOddRowsBackgroundColor } , 'Background color for the keyboard shortcuts table header.' ) ;
1147
- const keybindingTableRows = registerColor ( 'keybindingTable.rowsBackground' , { light : tableOddRowsBackgroundColor , dark : tableOddRowsBackgroundColor , hcDark : tableOddRowsBackgroundColor , hcLight : tableOddRowsBackgroundColor } , 'Background color for the keyboard shortcuts table alternating rows.' ) ;
1145
+ registerColor ( 'keybindingTable.headerBackground' , { dark : tableOddRowsBackgroundColor , light : tableOddRowsBackgroundColor , hcDark : tableOddRowsBackgroundColor , hcLight : tableOddRowsBackgroundColor } , 'Background color for the keyboard shortcuts table header.' ) ;
1146
+ registerColor ( 'keybindingTable.rowsBackground' , { light : tableOddRowsBackgroundColor , dark : tableOddRowsBackgroundColor , hcDark : tableOddRowsBackgroundColor , hcLight : tableOddRowsBackgroundColor } , 'Background color for the keyboard shortcuts table alternating rows.' ) ;
1148
1147
1149
1148
registerThemingParticipant ( ( theme : IColorTheme , collector : ICssStyleCollector ) => {
1150
-
1151
- const tableHeader = theme . getColor ( keybindingTableHeader ) ;
1152
- if ( tableHeader ) {
1153
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-th { background-color: ${ tableHeader } ; }` ) ;
1154
- }
1155
-
1156
- const tableRows = theme . getColor ( keybindingTableRows ) ;
1157
- if ( tableRows ) {
1158
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr { background-color: ${ tableRows } ; }` ) ;
1159
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { background-color: ${ tableRows } ; }` ) ;
1160
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { background-color: ${ tableRows } ; }` ) ;
1161
- }
1162
-
1163
1149
const foregroundColor = theme . getColor ( foreground ) ;
1164
1150
if ( foregroundColor ) {
1165
1151
const whenForegroundColor = foregroundColor . transparent ( .8 ) . makeOpaque ( WORKBENCH_BACKGROUND ( theme ) ) ;
@@ -1193,24 +1179,4 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
1193
1179
const whenForegroundColor = listHoverForegroundColor . transparent ( .8 ) . makeOpaque ( listHoverBackgroundColor ) ;
1194
1180
collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row:hover:not(.focused):not(.selected) .monaco-table-tr .monaco-table-td .code { color: ${ whenForegroundColor } ; }` ) ;
1195
1181
}
1196
-
1197
- const listHighlightForegroundColor = theme . getColor ( listHighlightForeground ) ;
1198
- if ( listHighlightForegroundColor ) {
1199
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-tr .monaco-table-td .highlight { color: ${ listHighlightForegroundColor } ; }` ) ;
1200
- }
1201
-
1202
- if ( listActiveSelectionForegroundColor ) {
1203
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row.selected.focused .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${ listActiveSelectionForegroundColor } ; }` ) ;
1204
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table.focused .monaco-list-row.selected .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${ listActiveSelectionForegroundColor } ; }` ) ;
1205
- }
1206
- const listInactiveFocusAndSelectionForegroundColor = theme . getColor ( listInactiveSelectionForeground ) ;
1207
- if ( listInactiveFocusAndSelectionForegroundColor ) {
1208
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row.selected .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${ listInactiveFocusAndSelectionForegroundColor } ; }` ) ;
1209
- }
1210
- if ( listHoverForegroundColor ) {
1211
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row:hover:not(.selected):not(.focused) .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${ listHoverForegroundColor } ; }` ) ;
1212
- }
1213
- if ( listFocusForegroundColor ) {
1214
- collector . addRule ( `.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row.focused .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${ listFocusForegroundColor } ; }` ) ;
1215
- }
1216
1182
} ) ;
0 commit comments