@codingame/monaco-vscode-theme-service-override 9.0.3 → 10.0.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.
- package/package.json +3 -3
- package/theme.js +2 -2
- package/vscode/src/vs/workbench/contrib/themes/browser/themes.contribution.js +69 -83
- package/vscode/src/vs/workbench/services/themes/browser/fileIconThemeData.js +8 -8
- package/vscode/src/vs/workbench/services/themes/browser/productIconThemeData.js +14 -15
- package/vscode/src/vs/workbench/services/themes/browser/workbenchThemeService.js +5 -8
- package/vscode/src/vs/workbench/services/themes/common/colorThemeSchema.js +13 -13
- package/vscode/src/vs/workbench/services/themes/common/fileIconThemeSchema.js +39 -39
- package/vscode/src/vs/workbench/services/themes/common/productIconThemeSchema.js +8 -8
- package/vscode/src/vs/workbench/services/themes/common/themeConfiguration.js +44 -45
- package/vscode/src/vs/workbench/services/themes/common/themeExtensionPoints.js +21 -21
- package/vscode/src/vs/workbench/services/themes/common/colorThemeData.js +0 -887
- package/vscode/src/vs/workbench/services/themes/common/plistParser.js +0 -419
- package/vscode/src/vs/workbench/services/themes/common/textMateScopeMatcher.js +0 -121
- package/vscode/src/vs/workbench/services/themes/common/themeCompatibility.js +0 -78
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-theme-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
30
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-files-service-override": "10.0.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/theme.js
CHANGED
|
@@ -11,9 +11,9 @@ class StandaloneWorkbenchThemeService extends WorkbenchThemeService {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
setTheme(themeName) {
|
|
14
|
-
void this.getColorThemes().then(themes => {
|
|
14
|
+
void this.getColorThemes().then((themes) => {
|
|
15
15
|
setTimeout(() => {
|
|
16
|
-
void this.setColorTheme(themes.find(theme => theme.settingsId === themeName) ?? themeName, 8 );
|
|
16
|
+
void this.setColorTheme(themes.find((theme) => theme.settingsId === themeName) ?? themeName, 8 );
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { KeyChord
|
|
3
|
+
import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
4
4
|
import { registerAction2, Action2, MenuId, MenuRegistry } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
5
|
import { equalsIgnoreCase } from 'vscode/vscode/vs/base/common/strings';
|
|
6
6
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
7
7
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
8
8
|
import { ThemeSettings, ThemeSettingDefaults } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
9
9
|
import { IWorkbenchThemeService } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService.service';
|
|
10
|
-
import {
|
|
10
|
+
import { IExtensionsWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
11
11
|
import { IExtensionGalleryService, IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
12
12
|
import { Extensions } from 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
13
13
|
import 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
@@ -27,12 +27,9 @@ import { colorThemeSchemaId } from '../../../services/themes/common/colorThemeSc
|
|
|
27
27
|
import { isCancellationError, onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
28
28
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
29
29
|
import { DEFAULT_PRODUCT_ICON_THEME_ID, ProductIconThemeData } from '../../../services/themes/browser/productIconThemeData.js';
|
|
30
|
-
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
31
|
-
import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
32
30
|
import { ThrottledDelayer } from 'vscode/vscode/vs/base/common/async';
|
|
33
31
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
34
32
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
35
|
-
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
36
33
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
37
34
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
38
35
|
import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
@@ -40,17 +37,14 @@ import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
|
40
37
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
41
38
|
import { IExtensionResourceLoaderService } from 'vscode/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader.service';
|
|
42
39
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
43
|
-
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
44
40
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
45
41
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
46
42
|
import { FileIconThemeData } from '../../../services/themes/browser/fileIconThemeData.js';
|
|
47
43
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
48
44
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
49
45
|
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
50
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
51
46
|
import 'vscode/vscode/vs/platform/notification/common/notification';
|
|
52
47
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
53
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
54
48
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
55
49
|
import { isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
56
50
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
@@ -63,7 +57,7 @@ import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
|
63
57
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
64
58
|
|
|
65
59
|
var DefaultThemeUpdatedNotificationContribution_1;
|
|
66
|
-
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(
|
|
60
|
+
const manageExtensionIcon = registerIcon('theme-selection-manage-extension', Codicon.gear, ( localize(3032, 'Icon for the \'Manage\' action in the theme selection quick pick.')));
|
|
67
61
|
var ConfigureItem;
|
|
68
62
|
( ((function(ConfigureItem) {
|
|
69
63
|
ConfigureItem["BROWSE_GALLERY"] = "marketplace";
|
|
@@ -71,7 +65,7 @@ var ConfigureItem;
|
|
|
71
65
|
ConfigureItem["CUSTOM_TOP_ENTRY"] = "customTopEntry";
|
|
72
66
|
})(ConfigureItem || (ConfigureItem = {}))));
|
|
73
67
|
let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
74
|
-
constructor(getMarketplaceColorThemes, marketplaceQuery, extensionGalleryService, extensionManagementService, quickInputService, logService, progressService,
|
|
68
|
+
constructor(getMarketplaceColorThemes, marketplaceQuery, extensionGalleryService, extensionManagementService, quickInputService, logService, progressService, extensionsWorkbenchService, dialogService) {
|
|
75
69
|
this.getMarketplaceColorThemes = getMarketplaceColorThemes;
|
|
76
70
|
this.marketplaceQuery = marketplaceQuery;
|
|
77
71
|
this.extensionGalleryService = extensionGalleryService;
|
|
@@ -79,7 +73,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
79
73
|
this.quickInputService = quickInputService;
|
|
80
74
|
this.logService = logService;
|
|
81
75
|
this.progressService = progressService;
|
|
82
|
-
this.
|
|
76
|
+
this.extensionsWorkbenchService = extensionsWorkbenchService;
|
|
83
77
|
this.dialogService = dialogService;
|
|
84
78
|
this._marketplaceExtensions = ( (new Set()));
|
|
85
79
|
this._marketplaceThemes = [];
|
|
@@ -171,7 +165,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
171
165
|
quickpick.matchOnDescription = true;
|
|
172
166
|
quickpick.buttons = [this.quickInputService.backButton];
|
|
173
167
|
quickpick.title = 'Marketplace Themes';
|
|
174
|
-
quickpick.placeholder = ( localize(
|
|
168
|
+
quickpick.placeholder = ( localize(3033, "Type to Search More. Select to Install. Up/Down Keys to Preview"));
|
|
175
169
|
quickpick.canSelectMany = false;
|
|
176
170
|
disposables.add(quickpick.onDidChangeValue(() => this.trigger(quickpick.value)));
|
|
177
171
|
disposables.add(quickpick.onDidAccept(async (_) => {
|
|
@@ -192,10 +186,10 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
192
186
|
if (isItem(e.item)) {
|
|
193
187
|
const extensionId = e.item.theme?.extensionData?.extensionId;
|
|
194
188
|
if (extensionId) {
|
|
195
|
-
|
|
189
|
+
this.extensionsWorkbenchService.openSearch(`@id:${extensionId}`);
|
|
196
190
|
}
|
|
197
191
|
else {
|
|
198
|
-
|
|
192
|
+
this.extensionsWorkbenchService.openSearch(`${this.marketplaceQuery} ${quickpick.value}`);
|
|
199
193
|
}
|
|
200
194
|
}
|
|
201
195
|
}));
|
|
@@ -223,7 +217,7 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
223
217
|
items = items.concat({ label: '$(sync~spin) Searching for themes...', id: undefined, alwaysShow: true });
|
|
224
218
|
}
|
|
225
219
|
else if (items.length === 0 && this._searchError) {
|
|
226
|
-
items = [{ label: `$(error) ${( localize(
|
|
220
|
+
items = [{ label: `$(error) ${( localize(3034, 'Error while searching for themes: {0}', this._searchError))}`, id: undefined, alwaysShow: true }];
|
|
227
221
|
}
|
|
228
222
|
const activeItemId = quickpick.activeItems[0]?.id;
|
|
229
223
|
const newActiveItem = activeItemId ? items.find(i => isItem(i) && i.id === activeItemId) : undefined;
|
|
@@ -239,23 +233,23 @@ let MarketplaceThemesPicker = class MarketplaceThemesPicker {
|
|
|
239
233
|
});
|
|
240
234
|
}
|
|
241
235
|
async installExtension(galleryExtension) {
|
|
242
|
-
|
|
236
|
+
this.extensionsWorkbenchService.openSearch(`@id:${galleryExtension.identifier.id}`);
|
|
243
237
|
const result = await this.dialogService.confirm({
|
|
244
238
|
message: ( localize(
|
|
245
|
-
|
|
239
|
+
3035,
|
|
246
240
|
"This will install extension '{0}' published by '{1}'. Do you want to continue?",
|
|
247
241
|
galleryExtension.displayName,
|
|
248
242
|
galleryExtension.publisherDisplayName
|
|
249
243
|
)),
|
|
250
|
-
primaryButton: ( localize(
|
|
244
|
+
primaryButton: ( localize(3036, "OK"))
|
|
251
245
|
});
|
|
252
246
|
if (!result.confirmed) {
|
|
253
247
|
return false;
|
|
254
248
|
}
|
|
255
249
|
try {
|
|
256
250
|
await this.progressService.withProgress({
|
|
257
|
-
location:
|
|
258
|
-
title: ( localize(
|
|
251
|
+
location: 15 ,
|
|
252
|
+
title: ( localize(3037, "Installing Extension {0}...", galleryExtension.displayName))
|
|
259
253
|
}, async () => {
|
|
260
254
|
await this.extensionManagementService.installFromGallery(galleryExtension, {
|
|
261
255
|
isMachineScoped: false,
|
|
@@ -284,17 +278,17 @@ MarketplaceThemesPicker = ( (__decorate([
|
|
|
284
278
|
( (__param(4, IQuickInputService))),
|
|
285
279
|
( (__param(5, ILogService))),
|
|
286
280
|
( (__param(6, IProgressService))),
|
|
287
|
-
( (__param(7,
|
|
281
|
+
( (__param(7, IExtensionsWorkbenchService))),
|
|
288
282
|
( (__param(8, IDialogService)))
|
|
289
283
|
], MarketplaceThemesPicker)));
|
|
290
284
|
let InstalledThemesPicker = class InstalledThemesPicker {
|
|
291
|
-
constructor(options, setTheme, getMarketplaceColorThemes, quickInputService, extensionGalleryService,
|
|
285
|
+
constructor(options, setTheme, getMarketplaceColorThemes, quickInputService, extensionGalleryService, extensionsWorkbenchService, extensionResourceLoaderService, instantiationService) {
|
|
292
286
|
this.options = options;
|
|
293
287
|
this.setTheme = setTheme;
|
|
294
288
|
this.getMarketplaceColorThemes = getMarketplaceColorThemes;
|
|
295
289
|
this.quickInputService = quickInputService;
|
|
296
290
|
this.extensionGalleryService = extensionGalleryService;
|
|
297
|
-
this.
|
|
291
|
+
this.extensionsWorkbenchService = extensionsWorkbenchService;
|
|
298
292
|
this.extensionResourceLoaderService = extensionResourceLoaderService;
|
|
299
293
|
this.instantiationService = instantiationService;
|
|
300
294
|
}
|
|
@@ -345,7 +339,7 @@ let InstalledThemesPicker = class InstalledThemesPicker {
|
|
|
345
339
|
const theme = quickpick.selectedItems[0];
|
|
346
340
|
if (!theme || theme.configureItem) {
|
|
347
341
|
if (!theme || theme.configureItem === ConfigureItem.EXTENSIONS_VIEW) {
|
|
348
|
-
|
|
342
|
+
this.extensionsWorkbenchService.openSearch(`${this.options.marketplaceTag} ${quickpick.value}`);
|
|
349
343
|
}
|
|
350
344
|
else if (theme.configureItem === ConfigureItem.BROWSE_GALLERY) {
|
|
351
345
|
if (marketplaceThemePicker) {
|
|
@@ -374,10 +368,10 @@ let InstalledThemesPicker = class InstalledThemesPicker {
|
|
|
374
368
|
if (isItem(e.item)) {
|
|
375
369
|
const extensionId = e.item.theme?.extensionData?.extensionId;
|
|
376
370
|
if (extensionId) {
|
|
377
|
-
|
|
371
|
+
this.extensionsWorkbenchService.openSearch(`@id:${extensionId}`);
|
|
378
372
|
}
|
|
379
373
|
else {
|
|
380
|
-
|
|
374
|
+
this.extensionsWorkbenchService.openSearch(`${this.options.marketplaceTag} ${quickpick.value}`);
|
|
381
375
|
}
|
|
382
376
|
}
|
|
383
377
|
}));
|
|
@@ -393,7 +387,7 @@ let InstalledThemesPicker = class InstalledThemesPicker {
|
|
|
393
387
|
InstalledThemesPicker = ( (__decorate([
|
|
394
388
|
( (__param(3, IQuickInputService))),
|
|
395
389
|
( (__param(4, IExtensionGalleryService))),
|
|
396
|
-
( (__param(5,
|
|
390
|
+
( (__param(5, IExtensionsWorkbenchService))),
|
|
397
391
|
( (__param(6, IExtensionResourceLoaderService))),
|
|
398
392
|
( (__param(7, IInstantiationService)))
|
|
399
393
|
], InstalledThemesPicker)));
|
|
@@ -402,23 +396,23 @@ registerAction2(class extends Action2 {
|
|
|
402
396
|
constructor() {
|
|
403
397
|
super({
|
|
404
398
|
id: SelectColorThemeCommandId,
|
|
405
|
-
title: ( localize2(
|
|
399
|
+
title: ( localize2(3038, 'Color Theme')),
|
|
406
400
|
category: Categories.Preferences,
|
|
407
401
|
f1: true,
|
|
408
402
|
keybinding: {
|
|
409
|
-
weight:
|
|
410
|
-
primary: KeyChord(
|
|
403
|
+
weight: 200 ,
|
|
404
|
+
primary: KeyChord(2048 | 41 , 2048 | 50 )
|
|
411
405
|
}
|
|
412
406
|
});
|
|
413
407
|
}
|
|
414
408
|
getTitle(colorScheme) {
|
|
415
409
|
switch (colorScheme) {
|
|
416
|
-
case ColorScheme.DARK: return ( localize(
|
|
417
|
-
case ColorScheme.LIGHT: return ( localize(
|
|
418
|
-
case ColorScheme.HIGH_CONTRAST_DARK: return ( localize(
|
|
419
|
-
case ColorScheme.HIGH_CONTRAST_LIGHT: return ( localize(
|
|
410
|
+
case ColorScheme.DARK: return ( localize(3039, "Select Color Theme for System Dark Mode"));
|
|
411
|
+
case ColorScheme.LIGHT: return ( localize(3040, "Select Color Theme for System Light Mode"));
|
|
412
|
+
case ColorScheme.HIGH_CONTRAST_DARK: return ( localize(3041, "Select Color Theme for High Contrast Dark Mode"));
|
|
413
|
+
case ColorScheme.HIGH_CONTRAST_LIGHT: return ( localize(3042, "Select Color Theme for High Contrast Light Mode"));
|
|
420
414
|
default:
|
|
421
|
-
return ( localize(
|
|
415
|
+
return ( localize(3043, "Select Color Theme (detect system color mode disabled)"));
|
|
422
416
|
}
|
|
423
417
|
}
|
|
424
418
|
async run(accessor) {
|
|
@@ -428,7 +422,7 @@ registerAction2(class extends Action2 {
|
|
|
428
422
|
let modeConfigureToggle;
|
|
429
423
|
if (preferredColorScheme) {
|
|
430
424
|
modeConfigureToggle = ( (new Toggle({
|
|
431
|
-
title: ( localize(
|
|
425
|
+
title: ( localize(3044, 'Detect system color mode enabled. Click to configure.')),
|
|
432
426
|
icon: Codicon.colorMode,
|
|
433
427
|
isChecked: false,
|
|
434
428
|
...defaultToggleStyles
|
|
@@ -436,15 +430,15 @@ registerAction2(class extends Action2 {
|
|
|
436
430
|
}
|
|
437
431
|
else {
|
|
438
432
|
modeConfigureToggle = ( (new Toggle({
|
|
439
|
-
title: ( localize(
|
|
433
|
+
title: ( localize(3045, 'Detect system color mode disabled. Click to configure.')),
|
|
440
434
|
icon: Codicon.colorMode,
|
|
441
435
|
isChecked: false,
|
|
442
436
|
...defaultToggleStyles
|
|
443
437
|
})));
|
|
444
438
|
}
|
|
445
439
|
const options = {
|
|
446
|
-
installMessage: ( localize(
|
|
447
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
440
|
+
installMessage: ( localize(3046, "Install Additional Color Themes...")),
|
|
441
|
+
browseMessage: '$(plus) ' + ( localize(3047, "Browse Additional Color Themes...")),
|
|
448
442
|
placeholderMessage: this.getTitle(preferredColorScheme),
|
|
449
443
|
marketplaceTag: 'category:themes',
|
|
450
444
|
toggles: [modeConfigureToggle],
|
|
@@ -459,9 +453,9 @@ registerAction2(class extends Action2 {
|
|
|
459
453
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
460
454
|
const themes = await themeService.getColorThemes();
|
|
461
455
|
const currentTheme = themeService.getColorTheme();
|
|
462
|
-
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(
|
|
463
|
-
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(
|
|
464
|
-
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(
|
|
456
|
+
const lightEntries = toEntries(themes.filter(t => t.type === ColorScheme.LIGHT), ( localize(3048, "light themes")));
|
|
457
|
+
const darkEntries = toEntries(themes.filter(t => t.type === ColorScheme.DARK), ( localize(3049, "dark themes")));
|
|
458
|
+
const hcEntries = toEntries(themes.filter(t => isHighContrast(t.type)), ( localize(3050, "high contrast themes")));
|
|
465
459
|
let picks;
|
|
466
460
|
switch (preferredColorScheme) {
|
|
467
461
|
case ColorScheme.DARK:
|
|
@@ -484,7 +478,7 @@ registerAction2(class extends Action2 {
|
|
|
484
478
|
constructor() {
|
|
485
479
|
super({
|
|
486
480
|
id: SelectFileIconThemeCommandId,
|
|
487
|
-
title: ( localize2(
|
|
481
|
+
title: ( localize2(3051, 'File Icon Theme')),
|
|
488
482
|
category: Categories.Preferences,
|
|
489
483
|
f1: true
|
|
490
484
|
});
|
|
@@ -492,8 +486,8 @@ registerAction2(class extends Action2 {
|
|
|
492
486
|
async run(accessor) {
|
|
493
487
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
494
488
|
const options = {
|
|
495
|
-
installMessage: ( localize(
|
|
496
|
-
placeholderMessage: ( localize(
|
|
489
|
+
installMessage: ( localize(3052, "Install Additional File Icon Themes...")),
|
|
490
|
+
placeholderMessage: ( localize(3053, "Select File Icon Theme (Up/Down Keys to Preview)")),
|
|
497
491
|
marketplaceTag: 'tag:icon-theme'
|
|
498
492
|
};
|
|
499
493
|
const setTheme = (theme, settingsTarget) => themeService.setFileIconTheme(theme, settingsTarget);
|
|
@@ -501,8 +495,8 @@ registerAction2(class extends Action2 {
|
|
|
501
495
|
const instantiationService = accessor.get(IInstantiationService);
|
|
502
496
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
503
497
|
const picks = [
|
|
504
|
-
{ type: 'separator', label: ( localize(
|
|
505
|
-
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(
|
|
498
|
+
{ type: 'separator', label: ( localize(3054, 'file icon themes')) },
|
|
499
|
+
{ id: '', theme: FileIconThemeData.noIconTheme, label: ( localize(3055, 'None')), description: ( localize(3056, 'Disable File Icons')) },
|
|
506
500
|
...toEntries(await themeService.getFileIconThemes()),
|
|
507
501
|
];
|
|
508
502
|
await picker.openQuickPick(picks, themeService.getFileIconTheme());
|
|
@@ -513,7 +507,7 @@ registerAction2(class extends Action2 {
|
|
|
513
507
|
constructor() {
|
|
514
508
|
super({
|
|
515
509
|
id: SelectProductIconThemeCommandId,
|
|
516
|
-
title: ( localize2(
|
|
510
|
+
title: ( localize2(3057, 'Product Icon Theme')),
|
|
517
511
|
category: Categories.Preferences,
|
|
518
512
|
f1: true
|
|
519
513
|
});
|
|
@@ -521,9 +515,9 @@ registerAction2(class extends Action2 {
|
|
|
521
515
|
async run(accessor) {
|
|
522
516
|
const themeService = accessor.get(IWorkbenchThemeService);
|
|
523
517
|
const options = {
|
|
524
|
-
installMessage: ( localize(
|
|
525
|
-
browseMessage: '$(plus) ' + ( localize(
|
|
526
|
-
placeholderMessage: ( localize(
|
|
518
|
+
installMessage: ( localize(3058, "Install Additional Product Icon Themes...")),
|
|
519
|
+
browseMessage: '$(plus) ' + ( localize(3059, "Browse Additional Product Icon Themes...")),
|
|
520
|
+
placeholderMessage: ( localize(3060, "Select Product Icon Theme (Up/Down Keys to Preview)")),
|
|
527
521
|
marketplaceTag: 'tag:product-icon-theme'
|
|
528
522
|
};
|
|
529
523
|
const setTheme = (theme, settingsTarget) => themeService.setProductIconTheme(theme, settingsTarget);
|
|
@@ -531,8 +525,8 @@ registerAction2(class extends Action2 {
|
|
|
531
525
|
const instantiationService = accessor.get(IInstantiationService);
|
|
532
526
|
const picker = instantiationService.createInstance(InstalledThemesPicker, options, setTheme, getMarketplaceColorThemes);
|
|
533
527
|
const picks = [
|
|
534
|
-
{ type: 'separator', label: ( localize(
|
|
535
|
-
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(
|
|
528
|
+
{ type: 'separator', label: ( localize(3061, 'product icon themes')) },
|
|
529
|
+
{ id: DEFAULT_PRODUCT_ICON_THEME_ID, theme: ProductIconThemeData.defaultTheme, label: ( localize(3062, 'Default')) },
|
|
536
530
|
...toEntries(await themeService.getProductIconThemes()),
|
|
537
531
|
];
|
|
538
532
|
await picker.openQuickPick(picks, themeService.getProductIconTheme());
|
|
@@ -564,14 +558,6 @@ function configurationEntry(label, configureItem) {
|
|
|
564
558
|
configureItem: configureItem
|
|
565
559
|
};
|
|
566
560
|
}
|
|
567
|
-
function openExtensionViewlet(paneCompositeService, query) {
|
|
568
|
-
return paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar, true).then(viewlet => {
|
|
569
|
-
if (viewlet) {
|
|
570
|
-
(viewlet?.getViewPaneContainer()).search(query);
|
|
571
|
-
viewlet.focus();
|
|
572
|
-
}
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
561
|
function isItem(i) {
|
|
576
562
|
return i['type'] !== 'separator';
|
|
577
563
|
}
|
|
@@ -598,13 +584,13 @@ function toEntries(themes, label) {
|
|
|
598
584
|
}
|
|
599
585
|
const configureButton = {
|
|
600
586
|
iconClass: ThemeIcon.asClassName(manageExtensionIcon),
|
|
601
|
-
tooltip: ( localize(
|
|
587
|
+
tooltip: ( localize(3063, "Manage Extension")),
|
|
602
588
|
};
|
|
603
589
|
registerAction2(class extends Action2 {
|
|
604
590
|
constructor() {
|
|
605
591
|
super({
|
|
606
592
|
id: 'workbench.action.generateColorTheme',
|
|
607
|
-
title: ( localize2(
|
|
593
|
+
title: ( localize2(3064, 'Generate Color Theme From Current Settings')),
|
|
608
594
|
category: Categories.Developer,
|
|
609
595
|
f1: true
|
|
610
596
|
});
|
|
@@ -654,7 +640,7 @@ registerAction2(class extends Action2 {
|
|
|
654
640
|
constructor() {
|
|
655
641
|
super({
|
|
656
642
|
id: toggleLightDarkThemesCommandId,
|
|
657
|
-
title: ( localize2(
|
|
643
|
+
title: ( localize2(3065, 'Toggle between Light/Dark Themes')),
|
|
658
644
|
category: Categories.Preferences,
|
|
659
645
|
f1: true,
|
|
660
646
|
});
|
|
@@ -666,13 +652,13 @@ registerAction2(class extends Action2 {
|
|
|
666
652
|
const preferencesService = accessor.get(IPreferencesService);
|
|
667
653
|
if (configurationService.getValue(ThemeSettings.DETECT_COLOR_SCHEME)) {
|
|
668
654
|
const message = ( localize(
|
|
669
|
-
|
|
655
|
+
3066,
|
|
670
656
|
"Cannot toggle between light and dark themes when `{0}` is enabled in settings.",
|
|
671
657
|
ThemeSettings.DETECT_COLOR_SCHEME
|
|
672
658
|
));
|
|
673
659
|
notificationService.prompt(Severity$1.Info, message, [
|
|
674
660
|
{
|
|
675
|
-
label: ( localize(
|
|
661
|
+
label: ( localize(3067, "Open Settings")),
|
|
676
662
|
run: () => {
|
|
677
663
|
return preferencesService.openUserSettings({ query: ThemeSettings.DETECT_COLOR_SCHEME });
|
|
678
664
|
}
|
|
@@ -710,7 +696,7 @@ registerAction2(class extends Action2 {
|
|
|
710
696
|
constructor() {
|
|
711
697
|
super({
|
|
712
698
|
id: browseColorThemesInMarketplaceCommandId,
|
|
713
|
-
title: ( localize2(
|
|
699
|
+
title: ( localize2(3068, 'Browse Color Themes in Marketplace')),
|
|
714
700
|
category: Categories.Preferences,
|
|
715
701
|
f1: true,
|
|
716
702
|
});
|
|
@@ -746,13 +732,13 @@ registerAction2(class extends Action2 {
|
|
|
746
732
|
});
|
|
747
733
|
const ThemesSubMenu = ( (new MenuId('ThemesSubMenu')));
|
|
748
734
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
|
749
|
-
title: ( localize(
|
|
735
|
+
title: ( localize(3069, "Themes")),
|
|
750
736
|
submenu: ThemesSubMenu,
|
|
751
737
|
group: '2_configuration',
|
|
752
738
|
order: 7
|
|
753
739
|
});
|
|
754
740
|
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
755
|
-
title: ( localize(
|
|
741
|
+
title: ( localize(3070, "&&Theme")),
|
|
756
742
|
submenu: ThemesSubMenu,
|
|
757
743
|
group: '2_configuration',
|
|
758
744
|
order: 7
|
|
@@ -760,21 +746,21 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|
|
760
746
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
761
747
|
command: {
|
|
762
748
|
id: SelectColorThemeCommandId,
|
|
763
|
-
title: ( localize(
|
|
749
|
+
title: ( localize(3038, 'Color Theme'))
|
|
764
750
|
},
|
|
765
751
|
order: 1
|
|
766
752
|
});
|
|
767
753
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
768
754
|
command: {
|
|
769
755
|
id: SelectFileIconThemeCommandId,
|
|
770
|
-
title: ( localize(
|
|
756
|
+
title: ( localize(3071, "File Icon Theme"))
|
|
771
757
|
},
|
|
772
758
|
order: 2
|
|
773
759
|
});
|
|
774
760
|
MenuRegistry.appendMenuItem(ThemesSubMenu, {
|
|
775
761
|
command: {
|
|
776
762
|
id: SelectProductIconThemeCommandId,
|
|
777
|
-
title: ( localize(
|
|
763
|
+
title: ( localize(3072, "Product Icon Theme"))
|
|
778
764
|
},
|
|
779
765
|
order: 3
|
|
780
766
|
});
|
|
@@ -788,15 +774,15 @@ let DefaultThemeUpdatedNotificationContribution = class DefaultThemeUpdatedNotif
|
|
|
788
774
|
this._commandService = _commandService;
|
|
789
775
|
this._telemetryService = _telemetryService;
|
|
790
776
|
this._hostService = _hostService;
|
|
791
|
-
if (_storageService.getBoolean(DefaultThemeUpdatedNotificationContribution_1.STORAGE_KEY,
|
|
777
|
+
if (_storageService.getBoolean(DefaultThemeUpdatedNotificationContribution_1.STORAGE_KEY, -1 )) {
|
|
792
778
|
return;
|
|
793
779
|
}
|
|
794
780
|
setTimeout(async () => {
|
|
795
|
-
if (_storageService.getBoolean(DefaultThemeUpdatedNotificationContribution_1.STORAGE_KEY,
|
|
781
|
+
if (_storageService.getBoolean(DefaultThemeUpdatedNotificationContribution_1.STORAGE_KEY, -1 )) {
|
|
796
782
|
return;
|
|
797
783
|
}
|
|
798
784
|
if (await this._hostService.hadLastFocus()) {
|
|
799
|
-
this._storageService.store(DefaultThemeUpdatedNotificationContribution_1.STORAGE_KEY, true,
|
|
785
|
+
this._storageService.store(DefaultThemeUpdatedNotificationContribution_1.STORAGE_KEY, true, -1 , 0 );
|
|
800
786
|
if (this._workbenchThemeService.hasUpdatedDefaultThemes()) {
|
|
801
787
|
this._showYouGotMigratedNotification();
|
|
802
788
|
}
|
|
@@ -816,20 +802,20 @@ let DefaultThemeUpdatedNotificationContribution = class DefaultThemeUpdatedNotif
|
|
|
816
802
|
if (newTheme) {
|
|
817
803
|
const choices = [
|
|
818
804
|
{
|
|
819
|
-
label: ( localize(
|
|
805
|
+
label: ( localize(3073, "Keep New Theme")),
|
|
820
806
|
run: () => {
|
|
821
807
|
this._writeTelemetry('keepNew');
|
|
822
808
|
}
|
|
823
809
|
},
|
|
824
810
|
{
|
|
825
|
-
label: ( localize(
|
|
811
|
+
label: ( localize(3074, "Browse Themes")),
|
|
826
812
|
run: () => {
|
|
827
813
|
this._writeTelemetry('browse');
|
|
828
814
|
this._commandService.executeCommand(SelectColorThemeCommandId);
|
|
829
815
|
}
|
|
830
816
|
},
|
|
831
817
|
{
|
|
832
|
-
label: ( localize(
|
|
818
|
+
label: ( localize(3075, "Revert")),
|
|
833
819
|
run: async () => {
|
|
834
820
|
this._writeTelemetry('keepOld');
|
|
835
821
|
const oldSettingsId = usingLight ? ThemeSettingDefaults.COLOR_THEME_LIGHT_OLD : ThemeSettingDefaults.COLOR_THEME_DARK_OLD;
|
|
@@ -841,7 +827,7 @@ let DefaultThemeUpdatedNotificationContribution = class DefaultThemeUpdatedNotif
|
|
|
841
827
|
}
|
|
842
828
|
];
|
|
843
829
|
await this._notificationService.prompt(Severity$1.Info, ( localize(
|
|
844
|
-
|
|
830
|
+
3076,
|
|
845
831
|
"Visual Studio Code now ships with a new default theme '{0}'. If you prefer, you can switch back to the old theme or try one of the many other color themes available.",
|
|
846
832
|
newTheme.label
|
|
847
833
|
)), choices, {
|
|
@@ -854,20 +840,20 @@ let DefaultThemeUpdatedNotificationContribution = class DefaultThemeUpdatedNotif
|
|
|
854
840
|
const theme = (await this._workbenchThemeService.getColorThemes()).find(theme => theme.settingsId === newThemeSettingsId);
|
|
855
841
|
if (theme) {
|
|
856
842
|
const choices = [{
|
|
857
|
-
label: ( localize(
|
|
843
|
+
label: ( localize(3077, "Try New Theme")),
|
|
858
844
|
run: () => {
|
|
859
845
|
this._writeTelemetry('tryNew');
|
|
860
846
|
this._workbenchThemeService.setColorTheme(theme, 'auto');
|
|
861
847
|
}
|
|
862
848
|
},
|
|
863
849
|
{
|
|
864
|
-
label: ( localize(
|
|
850
|
+
label: ( localize(3078, "Cancel")),
|
|
865
851
|
run: () => {
|
|
866
852
|
this._writeTelemetry('cancel');
|
|
867
853
|
}
|
|
868
854
|
}];
|
|
869
855
|
await this._notificationService.prompt(Severity$1.Info, ( localize(
|
|
870
|
-
|
|
856
|
+
3079,
|
|
871
857
|
"Visual Studio Code now ships with a new default theme '{0}'. Do you want to give it a try?",
|
|
872
858
|
theme.label
|
|
873
859
|
)), choices, { onCancel: () => this._writeTelemetry('cancel') });
|
|
@@ -889,6 +875,6 @@ DefaultThemeUpdatedNotificationContribution = DefaultThemeUpdatedNotificationCon
|
|
|
889
875
|
( (__param(5, IHostService)))
|
|
890
876
|
], DefaultThemeUpdatedNotificationContribution)));
|
|
891
877
|
const workbenchRegistry = ( (Registry.as(Extensions$1.Workbench)));
|
|
892
|
-
workbenchRegistry.registerWorkbenchContribution(DefaultThemeUpdatedNotificationContribution,
|
|
878
|
+
workbenchRegistry.registerWorkbenchContribution(DefaultThemeUpdatedNotificationContribution, 4 );
|
|
893
879
|
|
|
894
880
|
export { manageExtensionIcon };
|
|
@@ -5,7 +5,6 @@ import { parse, getNodeType } from 'vscode/vscode/vs/base/common/json';
|
|
|
5
5
|
import { ExtensionData } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
6
6
|
import { getParseErrorMessage } from 'vscode/vscode/vs/base/common/jsonErrorMessages';
|
|
7
7
|
import { asCSSUrl } from 'vscode/vscode/vs/base/browser/dom';
|
|
8
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
9
8
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
10
9
|
|
|
11
10
|
class FileIconThemeData {
|
|
@@ -65,7 +64,7 @@ class FileIconThemeData {
|
|
|
65
64
|
return themeData;
|
|
66
65
|
}
|
|
67
66
|
static fromStorageData(storageService) {
|
|
68
|
-
const input = storageService.get(FileIconThemeData.STORAGE_KEY,
|
|
67
|
+
const input = storageService.get(FileIconThemeData.STORAGE_KEY, 0 );
|
|
69
68
|
if (!input) {
|
|
70
69
|
return undefined;
|
|
71
70
|
}
|
|
@@ -111,7 +110,7 @@ class FileIconThemeData {
|
|
|
111
110
|
extensionData: ExtensionData.toJSONObject(this.extensionData),
|
|
112
111
|
watch: this.watch
|
|
113
112
|
});
|
|
114
|
-
storageService.store(FileIconThemeData.STORAGE_KEY, data,
|
|
113
|
+
storageService.store(FileIconThemeData.STORAGE_KEY, data, 0 , 1 );
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
116
|
class FileIconThemeLoader {
|
|
@@ -139,13 +138,13 @@ class FileIconThemeLoader {
|
|
|
139
138
|
const contentValue = parse(content, errors);
|
|
140
139
|
if (errors.length > 0) {
|
|
141
140
|
return Promise.reject(( (new Error(( localize(
|
|
142
|
-
|
|
141
|
+
6950,
|
|
143
142
|
"Problems parsing file icons file: {0}",
|
|
144
143
|
( (errors.map(e => getParseErrorMessage(e.error)))).join(', ')
|
|
145
144
|
))))));
|
|
146
145
|
}
|
|
147
146
|
else if (getNodeType(contentValue) !== 'object') {
|
|
148
|
-
return Promise.reject(( (new Error(( localize(
|
|
147
|
+
return Promise.reject(( (new Error(( localize(6951, "Invalid format for file icons theme file: Object expected."))))));
|
|
149
148
|
}
|
|
150
149
|
return Promise.resolve(contentValue);
|
|
151
150
|
});
|
|
@@ -308,12 +307,13 @@ class FileIconThemeLoader {
|
|
|
308
307
|
});
|
|
309
308
|
cssRules.push(`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: '${fonts[0].id}'; font-size: ${defaultFontSize}; }`);
|
|
310
309
|
}
|
|
310
|
+
const emQuad = '\\2001';
|
|
311
311
|
for (const defId in selectorByDefinitionId) {
|
|
312
312
|
const selectors = selectorByDefinitionId[defId];
|
|
313
313
|
const definition = iconThemeDocument.iconDefinitions[defId];
|
|
314
314
|
if (definition) {
|
|
315
315
|
if (definition.iconPath) {
|
|
316
|
-
cssRules.push(`${selectors.join(', ')} { content: '
|
|
316
|
+
cssRules.push(`${selectors.join(', ')} { content: '${emQuad}'; background-image: ${asCSSUrl(resolvePath(definition.iconPath))}; }`);
|
|
317
317
|
}
|
|
318
318
|
else if (definition.fontCharacter || definition.fontColor) {
|
|
319
319
|
const body = [];
|
|
@@ -343,8 +343,8 @@ class FileIconThemeLoader {
|
|
|
343
343
|
const icon = this.languageService.getIcon(languageId);
|
|
344
344
|
if (icon) {
|
|
345
345
|
const selector = `.show-file-icons .${escapeCSS(languageId)}-lang-file-icon.file-icon::before`;
|
|
346
|
-
cssRules.push(`${selector} { content: '
|
|
347
|
-
cssRules.push(`.vs ${selector} { content: '
|
|
346
|
+
cssRules.push(`${selector} { content: '${emQuad}'; background-image: ${asCSSUrl(icon.dark)}; }`);
|
|
347
|
+
cssRules.push(`.vs ${selector} { content: '${emQuad}'; background-image: ${asCSSUrl(icon.light)}; }`);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|