mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Closes #128258: Adds ThemeIcon support
This commit is contained in:
@@ -13,6 +13,7 @@ import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
|
||||
import { ISplice, Sequence } from 'vs/base/common/sequence';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { MarshalledId } from 'vs/base/common/marshalling';
|
||||
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
class MainThreadSCMResourceGroup implements ISCMResourceGroup {
|
||||
|
||||
@@ -204,11 +205,14 @@ class MainThreadSCMProvider implements ISCMProvider {
|
||||
for (const [start, deleteCount, rawResources] of groupSlices) {
|
||||
const resources = rawResources.map(rawResource => {
|
||||
const [handle, sourceUri, icons, tooltip, strikeThrough, faded, contextValue, command] = rawResource;
|
||||
const icon = icons[0];
|
||||
const iconDark = icons[1] || icon;
|
||||
|
||||
const [light, dark] = icons;
|
||||
const icon = ThemeIcon.isThemeIcon(light) ? light : URI.revive(light);
|
||||
const iconDark = (ThemeIcon.isThemeIcon(dark) ? dark : URI.revive(dark)) || icon;
|
||||
|
||||
const decorations = {
|
||||
icon: icon ? URI.revive(icon) : undefined,
|
||||
iconDark: iconDark ? URI.revive(iconDark) : undefined,
|
||||
icon: icon,
|
||||
iconDark: iconDark,
|
||||
tooltip,
|
||||
strikeThrough,
|
||||
faded
|
||||
|
||||
Reference in New Issue
Block a user