@codingame/monaco-vscode-theme-service-override 36.2.7 → 37.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/index.js +1 -0
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/activityBar.css +301 -0
  4. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/commandCenter.css +47 -0
  5. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/editorBorder.css +96 -0
  6. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/fontRamp.css +206 -0
  7. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/keyboardFocusOnly.css +44 -0
  8. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/notificationsDialogs.css +146 -0
  9. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/padding.css +377 -0
  10. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/paneHeaders.css +123 -0
  11. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/roundedCorners.css +287 -0
  12. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/sashHandles.css +94 -0
  13. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/shadows.css +52 -0
  14. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/statusBar.css +97 -0
  15. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/tabs.css +1044 -0
  16. package/vscode/src/vs/workbench/contrib/modernUI/browser/media/titlebar.css +19 -0
  17. package/vscode/src/vs/workbench/contrib/modernUI/browser/modernUI.contribution.d.ts +28 -0
  18. package/vscode/src/vs/workbench/contrib/modernUI/browser/modernUI.contribution.js +219 -0
  19. package/vscode/src/vs/workbench/contrib/themes/browser/themes.contribution.js +45 -45
  20. package/vscode/src/vs/workbench/services/themes/browser/fileIconThemeData.js +7 -5
  21. package/vscode/src/vs/workbench/services/themes/browser/modernTabColorCustomizations.d.ts +1 -0
  22. package/vscode/src/vs/workbench/services/themes/browser/modernTabColorCustomizations.js +255 -0
  23. package/vscode/src/vs/workbench/services/themes/browser/productIconThemeData.js +12 -12
  24. package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +14 -5
  25. package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +16 -16
  26. package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +45 -38
  27. package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +7 -7
  28. package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.d.ts +2 -0
  29. package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +46 -36
  30. package/vscode/src/vs/workbench/services/themes/common/themeExtensionPoints.js +21 -21
@@ -0,0 +1,19 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ /*
7
+ * Modern UI module: "Title Bar".
8
+ *
9
+ * Adds a small amount of top padding to the title-bar left/center/right
10
+ * containers so their items read as vertically centered. Scoped to macOS for
11
+ * now. All rules are gated behind the `.modern-ui` class, which the
12
+ * ModernUIContribution toggles onto the workbench container(s) when the
13
+ * Modern UI Update setting is enabled.
14
+ */
15
+ .modern-ui.monaco-workbench.mac .part.titlebar > .titlebar-container > .titlebar-left,
16
+ .modern-ui.monaco-workbench.mac .part.titlebar > .titlebar-container > .titlebar-center,
17
+ .modern-ui.monaco-workbench.mac .part.titlebar > .titlebar-container > .titlebar-right {
18
+ padding-top: var(--vscode-spacing-size20);
19
+ }
@@ -0,0 +1,28 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
4
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
5
+ /**
6
+ * A contribution that toggles the built-in CSS Modern UI modules on or off
7
+ * as a group, based on the `workbench.experimental.modernUI` setting. When the
8
+ * Modern UI Update experiment is enabled, all modules are applied together;
9
+ * otherwise none are.
10
+ */
11
+ export declare class ModernUIContribution extends Disposable implements IWorkbenchContribution {
12
+ private readonly configurationService;
13
+ private readonly layoutService;
14
+ static readonly ID = "workbench.contrib.modernUI";
15
+ private readonly hasLayoutAffectingModule;
16
+ private layoutAffectingState;
17
+ constructor(configurationService: IConfigurationService, layoutService: IWorkbenchLayoutService);
18
+ private isEnabled;
19
+ private useUppercaseViewHeaders;
20
+ private isCompact;
21
+ private getLayoutAffectingState;
22
+ private update;
23
+ private applyTo;
24
+ private applyScrollbarSize;
25
+ private applyNotificationRowHeight;
26
+ private applyPaneHeaderSize;
27
+ dispose(): void;
28
+ }
@@ -0,0 +1,219 @@
1
+
2
+ import { registerCss } from '@codingame/monaco-vscode-api/css';
3
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
6
+ import { MenuId, MenuRegistry, registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
7
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
8
+ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
9
+ import { ModernUIDensity, LayoutSettings } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
10
+ import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
11
+ import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
12
+ import { setGlobalDefaultScrollbarSize, DEFAULT_SCROLLBAR_SIZE } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
13
+ import { setNotificationRowHeight, COMPACT_NOTIFICATION_ROW_HEIGHT, DEFAULT_NOTIFICATION_ROW_HEIGHT } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/notifications/notificationsViewer';
14
+ import { DEFAULT_PANE_HEADER_SIZE, setGlobalPaneHeaderSize } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/splitview/paneview';
15
+ import * as activityBar from './media/activityBar.css';
16
+ import * as commandCenter from './media/commandCenter.css';
17
+ import * as editorBorder from './media/editorBorder.css';
18
+ import * as fontRamp from './media/fontRamp.css';
19
+ import * as keyboardFocusOnly from './media/keyboardFocusOnly.css';
20
+ import * as notificationsDialogs from './media/notificationsDialogs.css';
21
+ import * as padding from './media/padding.css';
22
+ import * as paneHeaders from './media/paneHeaders.css';
23
+ import * as roundedCorners from './media/roundedCorners.css';
24
+ import * as sashHandles from './media/sashHandles.css';
25
+ import * as shadows from './media/shadows.css';
26
+ import * as statusBar from './media/statusBar.css';
27
+ import * as tabs from './media/tabs.css';
28
+ import * as titlebar from './media/titlebar.css';
29
+ import '../../../services/themes/browser/modernTabColorCustomizations.js';
30
+
31
+ const MODERN_UI_SCROLLBAR_SIZE = 8;
32
+ const MODERN_UI_PANE_HEADER_SIZE = 28;
33
+ registerCss(activityBar);
34
+ registerCss(commandCenter);
35
+ registerCss(editorBorder);
36
+ registerCss(fontRamp);
37
+ registerCss(keyboardFocusOnly);
38
+ registerCss(notificationsDialogs);
39
+ registerCss(padding);
40
+ registerCss(paneHeaders);
41
+ registerCss(roundedCorners);
42
+ registerCss(sashHandles);
43
+ registerCss(shadows);
44
+ registerCss(statusBar);
45
+ registerCss(tabs);
46
+ registerCss(titlebar);
47
+ const MODERN_UI_CLASS = "modern-ui";
48
+ const MODERN_UI_COMPACT_CLASS = "modern-ui-compact";
49
+ const MODERN_UI_TABS_CLASS = "modern-ui-tabs";
50
+ const MODERN_UI_NOTIFICATIONS_DIALOGS_CLASS = "modern-ui-notifications-dialogs";
51
+ const MODERN_UI_UPPERCASE_VIEW_HEADERS_CLASS = "modern-ui-uppercase-view-headers";
52
+ const LayoutDensityMenu = ( new MenuId("LayoutDensityMenu"));
53
+ const layoutDensityOptions = [{
54
+ density: ModernUIDensity.Default,
55
+ title: ( localize2(14321, "Default"))
56
+ }, {
57
+ density: ModernUIDensity.Compact,
58
+ title: ( localize2(14322, "Compact"))
59
+ }];
60
+ MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
61
+ title: ( localize(14323, "Layout Density")),
62
+ submenu: LayoutDensityMenu,
63
+ group: "2_configuration",
64
+ order: 8,
65
+ when: ( ContextKeyExpr.equals(`config.${LayoutSettings.MODERN_UI}`, true))
66
+ });
67
+ for (let index = 0; index < layoutDensityOptions.length; index++) {
68
+ const option = layoutDensityOptions[index];
69
+ registerAction2(class extends Action2 {
70
+ constructor() {
71
+ super({
72
+ id: `workbench.action.setLayoutDensity.${option.density}`,
73
+ title: option.title,
74
+ toggled: ( ContextKeyExpr.equals(`config.${LayoutSettings.MODERN_UI_DENSITY}`, option.density)),
75
+ menu: {
76
+ id: LayoutDensityMenu,
77
+ order: index + 1
78
+ }
79
+ });
80
+ }
81
+ run(accessor) {
82
+ return accessor.get(IConfigurationService).updateValue(LayoutSettings.MODERN_UI_DENSITY, option.density);
83
+ }
84
+ });
85
+ }
86
+ const MODERN_UI_MODULES = [{
87
+ id: "activityBar"
88
+ }, {
89
+ id: "commandCenter"
90
+ }, {
91
+ id: "editorBorder"
92
+ }, {
93
+ id: "fontRamp"
94
+ }, {
95
+ id: "keyboardFocusOnly"
96
+ }, {
97
+ id: "padding"
98
+ }, {
99
+ id: "paneHeaders",
100
+ layoutAffecting: true
101
+ }, {
102
+ id: "roundedCorners"
103
+ }, {
104
+ id: "sashHandles"
105
+ }, {
106
+ id: "scrollShadows"
107
+ }, {
108
+ id: "shadows"
109
+ }, {
110
+ id: "statusBar"
111
+ }, {
112
+ id: "tabs"
113
+ }, {
114
+ id: "titlebar"
115
+ }, {
116
+ id: "notificationsDialogs"
117
+ }];
118
+ let ModernUIContribution = class ModernUIContribution extends Disposable {
119
+ static {
120
+ this.ID = "workbench.contrib.modernUI";
121
+ }
122
+ constructor(configurationService, layoutService) {
123
+ super();
124
+ this.configurationService = configurationService;
125
+ this.layoutService = layoutService;
126
+ this.hasLayoutAffectingModule = ( MODERN_UI_MODULES.some(m => m.layoutAffecting));
127
+ this.layoutAffectingState = "disabled";
128
+ this.layoutAffectingState = this.getLayoutAffectingState();
129
+ this._register(this.configurationService.onDidChangeConfiguration(e => {
130
+ if (e.affectsConfiguration(LayoutSettings.MODERN_UI) || e.affectsConfiguration(LayoutSettings.MODERN_UI_DENSITY) || e.affectsConfiguration(LayoutSettings.MODERN_UI_UPPERCASE_VIEW_HEADERS)) {
131
+ this.update();
132
+ const layoutAffectingState = this.getLayoutAffectingState();
133
+ if (layoutAffectingState !== this.layoutAffectingState) {
134
+ this.layoutAffectingState = layoutAffectingState;
135
+ this.layoutService.layout();
136
+ }
137
+ }
138
+ }));
139
+ this._register(this.layoutService.onDidAddContainer((
140
+ {
141
+ container
142
+ }
143
+ ) => {
144
+ const enabled = this.isEnabled();
145
+ this.applyTo(
146
+ container,
147
+ enabled,
148
+ enabled && this.isCompact(),
149
+ enabled && this.useUppercaseViewHeaders()
150
+ );
151
+ }));
152
+ this.update();
153
+ }
154
+ isEnabled() {
155
+ return this.configurationService.getValue(LayoutSettings.MODERN_UI) === true;
156
+ }
157
+ useUppercaseViewHeaders() {
158
+ return this.configurationService.getValue(LayoutSettings.MODERN_UI_UPPERCASE_VIEW_HEADERS) === true;
159
+ }
160
+ isCompact() {
161
+ return this.configurationService.getValue(LayoutSettings.MODERN_UI_DENSITY) === ModernUIDensity.Compact;
162
+ }
163
+ getLayoutAffectingState() {
164
+ if (!this.isEnabled() || !this.hasLayoutAffectingModule) {
165
+ return "disabled";
166
+ }
167
+ return this.isCompact() ? ModernUIDensity.Compact : ModernUIDensity.Default;
168
+ }
169
+ update() {
170
+ const enabled = this.isEnabled();
171
+ const compact = enabled && this.isCompact();
172
+ const useUppercaseViewHeaders = enabled && this.useUppercaseViewHeaders();
173
+ this.applyPaneHeaderSize(enabled);
174
+ for (const container of this.layoutService.containers) {
175
+ this.applyTo(container, enabled, compact, useUppercaseViewHeaders);
176
+ }
177
+ this.applyScrollbarSize(enabled);
178
+ this.applyNotificationRowHeight(enabled);
179
+ }
180
+ applyTo(container, enabled, compact, useUppercaseViewHeaders) {
181
+ container.classList.toggle(MODERN_UI_CLASS, enabled);
182
+ container.classList.toggle(MODERN_UI_COMPACT_CLASS, compact);
183
+ container.classList.toggle(MODERN_UI_TABS_CLASS, enabled);
184
+ container.classList.toggle(MODERN_UI_NOTIFICATIONS_DIALOGS_CLASS, enabled);
185
+ container.classList.toggle(MODERN_UI_UPPERCASE_VIEW_HEADERS_CLASS, useUppercaseViewHeaders);
186
+ }
187
+ applyScrollbarSize(enabled) {
188
+ setGlobalDefaultScrollbarSize(enabled ? MODERN_UI_SCROLLBAR_SIZE : DEFAULT_SCROLLBAR_SIZE);
189
+ }
190
+ applyNotificationRowHeight(enabled) {
191
+ setNotificationRowHeight(
192
+ enabled ? COMPACT_NOTIFICATION_ROW_HEIGHT : DEFAULT_NOTIFICATION_ROW_HEIGHT
193
+ );
194
+ }
195
+ applyPaneHeaderSize(enabled) {
196
+ let paneHeaderSize = DEFAULT_PANE_HEADER_SIZE;
197
+ if (enabled) {
198
+ paneHeaderSize = MODERN_UI_PANE_HEADER_SIZE;
199
+ }
200
+ setGlobalPaneHeaderSize(paneHeaderSize);
201
+ }
202
+ dispose() {
203
+ for (const container of this.layoutService.containers) {
204
+ container.classList.remove(MODERN_UI_CLASS);
205
+ container.classList.remove(MODERN_UI_COMPACT_CLASS);
206
+ container.classList.remove(MODERN_UI_TABS_CLASS);
207
+ container.classList.remove(MODERN_UI_NOTIFICATIONS_DIALOGS_CLASS);
208
+ container.classList.remove(MODERN_UI_UPPERCASE_VIEW_HEADERS_CLASS);
209
+ }
210
+ setGlobalDefaultScrollbarSize(DEFAULT_SCROLLBAR_SIZE);
211
+ setNotificationRowHeight(DEFAULT_NOTIFICATION_ROW_HEIGHT);
212
+ setGlobalPaneHeaderSize(DEFAULT_PANE_HEADER_SIZE);
213
+ super.dispose();
214
+ }
215
+ };
216
+ ModernUIContribution = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, IWorkbenchLayoutService))], ModernUIContribution));
217
+ registerWorkbenchContribution2(ModernUIContribution.ID, ModernUIContribution, WorkbenchPhase.BlockRestore);
218
+
219
+ export { ModernUIContribution };
@@ -53,7 +53,7 @@ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/com
53
53
  import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
54
54
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
55
55
 
56
- const manageExtensionIcon = registerIcon("theme-selection-manage-extension", Codicon.gear, ( localize(16201, "Icon for the 'Manage' action in the theme selection quick pick.")));
56
+ const manageExtensionIcon = registerIcon("theme-selection-manage-extension", Codicon.gear, ( localize(18265, "Icon for the 'Manage' action in the theme selection quick pick.")));
57
57
  var ConfigureItem;
58
58
  (function(ConfigureItem) {
59
59
  ConfigureItem["BROWSE_GALLERY"] = "marketplace";
@@ -184,7 +184,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
184
184
  quickpick.matchOnDescription = true;
185
185
  quickpick.buttons = [this.quickInputService.backButton];
186
186
  quickpick.title = "Marketplace Themes";
187
- quickpick.placeholder = ( localize(16202, "Type to Search More. Select to Install. Up/Down Keys to Preview"));
187
+ quickpick.placeholder = ( localize(18266, "Type to Search More. Select to Install. Up/Down Keys to Preview"));
188
188
  quickpick.canSelectMany = false;
189
189
  disposables.add(quickpick.onDidChangeValue(() => this.trigger(quickpick.value)));
190
190
  disposables.add(quickpick.onDidAccept(async _ => {
@@ -238,7 +238,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
238
238
  });
239
239
  } else if (items.length === 0 && this._searchError) {
240
240
  items = [{
241
- label: `$(error) ${( localize(16203, "Error while searching for themes: {0}", this._searchError))}`,
241
+ label: `$(error) ${( localize(18267, "Error while searching for themes: {0}", this._searchError))}`,
242
242
  id: undefined,
243
243
  alwaysShow: true
244
244
  }];
@@ -260,12 +260,12 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
260
260
  this.extensionsWorkbenchService.openSearch(`@id:${galleryExtension.identifier.id}`);
261
261
  const result = await this.dialogService.confirm({
262
262
  message: ( localize(
263
- 16204,
263
+ 18268,
264
264
  "This will install extension '{0}' published by '{1}'. Do you want to continue?",
265
265
  galleryExtension.displayName,
266
266
  galleryExtension.publisherDisplayName
267
267
  )),
268
- primaryButton: ( localize(16205, "OK"))
268
+ primaryButton: ( localize(18269, "OK"))
269
269
  });
270
270
  if (!result.confirmed) {
271
271
  return false;
@@ -273,7 +273,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
273
273
  try {
274
274
  await this.progressService.withProgress({
275
275
  location: ProgressLocation.Notification,
276
- title: ( localize(16206, "Installing Extension {0}...", galleryExtension.displayName))
276
+ title: ( localize(18270, "Installing Extension {0}...", galleryExtension.displayName))
277
277
  }, async () => {
278
278
  await this.extensionManagementService.installFromGallery(galleryExtension, {
279
279
  isMachineScoped: false
@@ -424,7 +424,7 @@ registerAction2(class extends Action2 {
424
424
  constructor() {
425
425
  super({
426
426
  id: SelectColorThemeCommandId,
427
- title: ( localize2(16207, "Color Theme")),
427
+ title: ( localize2(18271, "Color Theme")),
428
428
  category: Categories.Preferences,
429
429
  f1: true,
430
430
  keybinding: {
@@ -436,15 +436,15 @@ registerAction2(class extends Action2 {
436
436
  getTitle(colorScheme) {
437
437
  switch (colorScheme) {
438
438
  case ColorScheme.DARK:
439
- return localize(16208, "Select Color Theme for System Dark Mode");
439
+ return localize(18272, "Select Color Theme for System Dark Mode");
440
440
  case ColorScheme.LIGHT:
441
- return localize(16209, "Select Color Theme for System Light Mode");
441
+ return localize(18273, "Select Color Theme for System Light Mode");
442
442
  case ColorScheme.HIGH_CONTRAST_DARK:
443
- return localize(16210, "Select Color Theme for High Contrast Dark Mode");
443
+ return localize(18274, "Select Color Theme for High Contrast Dark Mode");
444
444
  case ColorScheme.HIGH_CONTRAST_LIGHT:
445
- return localize(16211, "Select Color Theme for High Contrast Light Mode");
445
+ return localize(18275, "Select Color Theme for High Contrast Light Mode");
446
446
  default:
447
- return localize(16212, "Select Color Theme (detect system color mode disabled)");
447
+ return localize(18276, "Select Color Theme (detect system color mode disabled)");
448
448
  }
449
449
  }
450
450
  async run(accessor) {
@@ -452,13 +452,13 @@ registerAction2(class extends Action2 {
452
452
  const preferencesService = accessor.get(IPreferencesService);
453
453
  const preferredColorScheme = themeService.getPreferredColorScheme();
454
454
  const modeConfigureButton = {
455
- tooltip: preferredColorScheme ? ( localize(16213, "Detect system color mode enabled. Click to configure.")) : ( localize(16214, "Detect system color mode disabled. Click to configure.")),
455
+ tooltip: preferredColorScheme ? ( localize(18277, "Detect system color mode enabled. Click to configure.")) : ( localize(18278, "Detect system color mode disabled. Click to configure.")),
456
456
  iconClass: ThemeIcon.asClassName(Codicon.colorMode),
457
457
  location: QuickInputButtonLocation.Inline
458
458
  };
459
459
  const options = {
460
- installMessage: ( localize(16215, "Install Additional Color Themes...")),
461
- browseMessage: "$(plus) " + ( localize(16216, "Browse Additional Color Themes...")),
460
+ installMessage: ( localize(18279, "Install Additional Color Themes...")),
461
+ browseMessage: "$(plus) " + ( localize(18280, "Browse Additional Color Themes...")),
462
462
  placeholderMessage: this.getTitle(preferredColorScheme),
463
463
  marketplaceTag: "category:themes",
464
464
  buttons: [modeConfigureButton],
@@ -475,9 +475,9 @@ registerAction2(class extends Action2 {
475
475
  const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
476
476
  const themes = await themeService.getColorThemes();
477
477
  const currentTheme = themeService.getColorTheme();
478
- const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(16217, "light themes")));
479
- const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(16218, "dark themes")));
480
- const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(16219, "high contrast themes")));
478
+ const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(18281, "light themes")));
479
+ const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(18282, "dark themes")));
480
+ const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(18283, "high contrast themes")));
481
481
  let picks;
482
482
  switch (preferredColorScheme) {
483
483
  case ColorScheme.DARK:
@@ -500,7 +500,7 @@ registerAction2(class extends Action2 {
500
500
  constructor() {
501
501
  super({
502
502
  id: SelectFileIconThemeCommandId,
503
- title: ( localize2(16220, "File Icon Theme")),
503
+ title: ( localize2(18284, "File Icon Theme")),
504
504
  category: Categories.Preferences,
505
505
  f1: true
506
506
  });
@@ -508,8 +508,8 @@ registerAction2(class extends Action2 {
508
508
  async run(accessor) {
509
509
  const themeService = accessor.get(IWorkbenchThemeService);
510
510
  const options = {
511
- installMessage: ( localize(16221, "Install Additional File Icon Themes...")),
512
- placeholderMessage: ( localize(16222, "Select File Icon Theme (Up/Down Keys to Preview)")),
511
+ installMessage: ( localize(18285, "Install Additional File Icon Themes...")),
512
+ placeholderMessage: ( localize(18286, "Select File Icon Theme (Up/Down Keys to Preview)")),
513
513
  marketplaceTag: "tag:icon-theme"
514
514
  };
515
515
  const setTheme = (theme, settingsTarget) => themeService.setFileIconTheme(theme, settingsTarget);
@@ -518,12 +518,12 @@ registerAction2(class extends Action2 {
518
518
  const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
519
519
  const picks = [{
520
520
  type: "separator",
521
- label: ( localize(16223, "file icon themes"))
521
+ label: ( localize(18287, "file icon themes"))
522
522
  }, {
523
523
  id: "",
524
524
  theme: FileIconThemeData.noIconTheme,
525
- label: ( localize(16224, "None")),
526
- description: ( localize(16225, "Disable File Icons"))
525
+ label: ( localize(18288, "None")),
526
+ description: ( localize(18289, "Disable File Icons"))
527
527
  }, ...toEntries(await themeService.getFileIconThemes())];
528
528
  await picker.openQuickPick(picks, themeService.getFileIconTheme());
529
529
  }
@@ -533,7 +533,7 @@ registerAction2(class extends Action2 {
533
533
  constructor() {
534
534
  super({
535
535
  id: SelectProductIconThemeCommandId,
536
- title: ( localize2(16226, "Product Icon Theme")),
536
+ title: ( localize2(18290, "Product Icon Theme")),
537
537
  category: Categories.Preferences,
538
538
  f1: true
539
539
  });
@@ -541,9 +541,9 @@ registerAction2(class extends Action2 {
541
541
  async run(accessor) {
542
542
  const themeService = accessor.get(IWorkbenchThemeService);
543
543
  const options = {
544
- installMessage: ( localize(16227, "Install Additional Product Icon Themes...")),
545
- browseMessage: "$(plus) " + ( localize(16228, "Browse Additional Product Icon Themes...")),
546
- placeholderMessage: ( localize(16229, "Select Product Icon Theme (Up/Down Keys to Preview)")),
544
+ installMessage: ( localize(18291, "Install Additional Product Icon Themes...")),
545
+ browseMessage: "$(plus) " + ( localize(18292, "Browse Additional Product Icon Themes...")),
546
+ placeholderMessage: ( localize(18293, "Select Product Icon Theme (Up/Down Keys to Preview)")),
547
547
  marketplaceTag: "tag:product-icon-theme"
548
548
  };
549
549
  const setTheme = (theme, settingsTarget) => themeService.setProductIconTheme(theme, settingsTarget);
@@ -552,11 +552,11 @@ registerAction2(class extends Action2 {
552
552
  const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
553
553
  const picks = [{
554
554
  type: "separator",
555
- label: ( localize(16230, "product icon themes"))
555
+ label: ( localize(18294, "product icon themes"))
556
556
  }, {
557
557
  id: DEFAULT_PRODUCT_ICON_THEME_ID,
558
558
  theme: ProductIconThemeData.defaultTheme,
559
- label: ( localize(16231, "Default"))
559
+ label: ( localize(18295, "Default"))
560
560
  }, ...toEntries(await themeService.getProductIconThemes())];
561
561
  await picker.openQuickPick(picks, themeService.getProductIconTheme());
562
562
  }
@@ -565,7 +565,7 @@ registerAction2(class extends Action2 {
565
565
  constructor() {
566
566
  super({
567
567
  id: "workbench.action.tryNewDefaultThemes",
568
- title: ( localize2(16232, "Try New Default Themes")),
568
+ title: ( localize2(18296, "Try New Default Themes")),
569
569
  category: Categories.Preferences,
570
570
  f1: true
571
571
  });
@@ -589,7 +589,7 @@ registerAction2(class extends Action2 {
589
589
  const disposables = ( new DisposableStore());
590
590
  const picker = disposables.add(quickInputService.createQuickPick());
591
591
  picker.items = items;
592
- picker.placeholder = ( localize(16233, "Pick a new default theme"));
592
+ picker.placeholder = ( localize(18297, "Pick a new default theme"));
593
593
  picker.canSelectMany = false;
594
594
  const preferredId = (previousTheme.type === ColorScheme.LIGHT || previousTheme.type === ColorScheme.HIGH_CONTRAST_LIGHT) ? ThemeSettingDefaults.COLOR_THEME_LIGHT : ThemeSettingDefaults.COLOR_THEME_DARK;
595
595
  const activeItem = items.find(i => themes.find(t => t.id === i.id)?.settingsId === preferredId);
@@ -675,8 +675,8 @@ function isItem(i) {
675
675
  return i["type"] !== "separator";
676
676
  }
677
677
  const defaultThemeDescriptions = {
678
- [ThemeSettingDefaults.COLOR_THEME_LIGHT]: ( localize(16234, "Default Light")),
679
- [ThemeSettingDefaults.COLOR_THEME_DARK]: ( localize(16235, "Default Dark"))
678
+ [ThemeSettingDefaults.COLOR_THEME_LIGHT]: ( localize(18298, "Default Light")),
679
+ [ThemeSettingDefaults.COLOR_THEME_DARK]: ( localize(18299, "Default Dark"))
680
680
  };
681
681
  function toEntry(theme) {
682
682
  const settingId = theme.settingsId ?? undefined;
@@ -715,13 +715,13 @@ function toEntries(themes, label) {
715
715
  }
716
716
  const configureButton = {
717
717
  iconClass: ThemeIcon.asClassName(manageExtensionIcon),
718
- tooltip: ( localize(16236, "Manage Extension"))
718
+ tooltip: ( localize(18300, "Manage Extension"))
719
719
  };
720
720
  registerAction2(class extends Action2 {
721
721
  constructor() {
722
722
  super({
723
723
  id: "workbench.action.generateColorTheme",
724
- title: ( localize2(16237, "Generate Color Theme From Current Settings")),
724
+ title: ( localize2(18301, "Generate Color Theme From Current Settings")),
725
725
  category: Categories.Developer,
726
726
  f1: true
727
727
  });
@@ -776,7 +776,7 @@ registerAction2(class extends Action2 {
776
776
  constructor() {
777
777
  super({
778
778
  id: toggleLightDarkThemesCommandId,
779
- title: ( localize2(16238, "Toggle between Light/Dark Themes")),
779
+ title: ( localize2(18302, "Toggle between Light/Dark Themes")),
780
780
  category: Categories.Preferences,
781
781
  f1: true
782
782
  });
@@ -788,12 +788,12 @@ registerAction2(class extends Action2 {
788
788
  const preferencesService = accessor.get(IPreferencesService);
789
789
  if (configurationService.getValue(ThemeSettings.DETECT_COLOR_SCHEME)) {
790
790
  const message = ( localize(
791
- 16239,
791
+ 18303,
792
792
  "Cannot toggle between light and dark themes when `{0}` is enabled in settings.",
793
793
  ThemeSettings.DETECT_COLOR_SCHEME
794
794
  ));
795
795
  notificationService.prompt(Severity.Info, message, [{
796
- label: ( localize(16240, "Open Settings")),
796
+ label: ( localize(18304, "Open Settings")),
797
797
  run: () => {
798
798
  return preferencesService.openUserSettings({
799
799
  query: ThemeSettings.DETECT_COLOR_SCHEME
@@ -832,7 +832,7 @@ registerAction2(class extends Action2 {
832
832
  constructor() {
833
833
  super({
834
834
  id: browseColorThemesInMarketplaceCommandId,
835
- title: ( localize2(16241, "Browse Color Themes in Marketplace")),
835
+ title: ( localize2(18305, "Browse Color Themes in Marketplace")),
836
836
  category: Categories.Preferences,
837
837
  f1: true
838
838
  });
@@ -873,13 +873,13 @@ registerAction2(class extends Action2 {
873
873
  });
874
874
  const ThemesSubMenu = ( new MenuId("ThemesSubMenu"));
875
875
  MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
876
- title: ( localize(16242, "Themes")),
876
+ title: ( localize(18306, "Themes")),
877
877
  submenu: ThemesSubMenu,
878
878
  group: "2_configuration",
879
879
  order: 7
880
880
  });
881
881
  MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
882
- title: ( localize(16243, "&&Themes")),
882
+ title: ( localize(18307, "&&Themes")),
883
883
  submenu: ThemesSubMenu,
884
884
  group: "2_configuration",
885
885
  order: 7
@@ -887,21 +887,21 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
887
887
  MenuRegistry.appendMenuItem(ThemesSubMenu, {
888
888
  command: {
889
889
  id: SelectColorThemeCommandId,
890
- title: ( localize(16207, "Color Theme"))
890
+ title: ( localize(18271, "Color Theme"))
891
891
  },
892
892
  order: 1
893
893
  });
894
894
  MenuRegistry.appendMenuItem(ThemesSubMenu, {
895
895
  command: {
896
896
  id: SelectFileIconThemeCommandId,
897
- title: ( localize(16244, "File Icon Theme"))
897
+ title: ( localize(18308, "File Icon Theme"))
898
898
  },
899
899
  order: 2
900
900
  });
901
901
  MenuRegistry.appendMenuItem(ThemesSubMenu, {
902
902
  command: {
903
903
  id: SelectProductIconThemeCommandId,
904
- title: ( localize(16245, "Product Icon Theme"))
904
+ title: ( localize(18309, "Product Icon Theme"))
905
905
  },
906
906
  order: 3
907
907
  });
@@ -149,12 +149,12 @@ class FileIconThemeLoader {
149
149
  const contentValue = parse(content, errors);
150
150
  if (errors.length > 0) {
151
151
  return Promise.reject(( new Error(( localize(
152
- 17974,
152
+ 20075,
153
153
  "Problems parsing file icons file: {0}",
154
154
  ( errors.map(e => getParseErrorMessage(e.error))).join(", ")
155
155
  )))));
156
156
  } else if (getNodeType(contentValue) !== "object") {
157
- return Promise.reject(( new Error(( localize(17975, "Invalid format for file icons theme file: Object expected.")))));
157
+ return Promise.reject(( new Error(( localize(20076, "Invalid format for file icons theme file: Object expected.")))));
158
158
  }
159
159
  return Promise.resolve(contentValue);
160
160
  });
@@ -362,13 +362,15 @@ class FileIconThemeLoader {
362
362
  );
363
363
  }
364
364
  const emQuad = stringValue("\\2001");
365
+ const imageIconStyle = iconPath => iconThemeDocument.usesCurrentColor ? inline`background-color: currentColor; background-image: none; mask: ${iconPath} no-repeat var(--file-icon-mask-position, left center); mask-size: var(--file-icon-mask-size, 16px); -webkit-mask: ${iconPath} no-repeat var(--file-icon-mask-position, left center); -webkit-mask-size: var(--file-icon-mask-size, 16px);` : inline`background-image: ${iconPath};`;
365
366
  for (const defId in selectorByDefinitionId) {
366
367
  const selectors = selectorByDefinitionId[defId];
367
368
  const definition = iconThemeDocument.iconDefinitions[defId];
368
369
  if (definition) {
369
370
  if (definition.iconPath) {
371
+ const iconPath = asCSSUrl(resolvePath(definition.iconPath));
370
372
  cssRules.push(
371
- inline`${selectors.join(", ")} { content: ${emQuad}; background-image: ${asCSSUrl(resolvePath(definition.iconPath))}; }`
373
+ inline`${selectors.join(", ")} { content: ${emQuad}; ${imageIconStyle(iconPath)} }`
372
374
  );
373
375
  } else if (definition.fontCharacter || definition.fontColor) {
374
376
  const body = new Builder();
@@ -399,10 +401,10 @@ class FileIconThemeLoader {
399
401
  if (icon) {
400
402
  const selector = inline`.show-file-icons .${classSelectorPart(languageId)}-lang-file-icon.file-icon::before`;
401
403
  cssRules.push(
402
- inline`${selector} { content: ${emQuad}; background-image: ${asCSSUrl(icon.dark)}; }`
404
+ inline`${selector} { content: ${emQuad}; ${imageIconStyle(asCSSUrl(icon.dark))} }`
403
405
  );
404
406
  cssRules.push(
405
- inline`.vs ${selector} { content: ${emQuad}; background-image: ${asCSSUrl(icon.light)}; }`
407
+ inline`.vs ${selector} { content: ${emQuad}; ${imageIconStyle(asCSSUrl(icon.light))} }`
406
408
  );
407
409
  }
408
410
  }