mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
ICommandAction support "uri-icon" and ThemeIcon
This commit is contained in:
@@ -31,6 +31,7 @@ import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs';
|
||||
import { mnemonicButtonLabel } from 'vs/base/common/labels';
|
||||
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
|
||||
|
||||
const RUN_TEXTMATE_IN_WORKER = false;
|
||||
|
||||
@@ -1089,7 +1090,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
private createTouchBarGroupSegments(items: ISerializableCommandAction[] = []): ITouchBarSegment[] {
|
||||
const segments: ITouchBarSegment[] = items.map(item => {
|
||||
let icon: NativeImage | undefined;
|
||||
if (item.iconLocation && item.iconLocation?.dark?.scheme === 'file') {
|
||||
if (item.iconLocation && !ThemeIcon.isThemeIcon(item.iconLocation) && item.iconLocation?.dark?.scheme === 'file') {
|
||||
icon = nativeImage.createFromPath(URI.revive(item.iconLocation.dark).fsPath);
|
||||
if (icon.isEmpty()) {
|
||||
icon = undefined;
|
||||
|
||||
Reference in New Issue
Block a user