mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Use URIs for custom view item's icons
This commit is contained in:
@@ -426,7 +426,7 @@ class ExtHostTreeView<T> extends Disposable {
|
||||
return handle;
|
||||
}
|
||||
|
||||
private getLightIconPath(extensionTreeItem: vscode.TreeItem): string {
|
||||
private getLightIconPath(extensionTreeItem: vscode.TreeItem): URI {
|
||||
if (extensionTreeItem.iconPath && !(extensionTreeItem.iconPath instanceof ThemeIcon)) {
|
||||
if (typeof extensionTreeItem.iconPath === 'string'
|
||||
|| extensionTreeItem.iconPath instanceof URI) {
|
||||
@@ -437,18 +437,18 @@ class ExtHostTreeView<T> extends Disposable {
|
||||
return void 0;
|
||||
}
|
||||
|
||||
private getDarkIconPath(extensionTreeItem: vscode.TreeItem): string {
|
||||
private getDarkIconPath(extensionTreeItem: vscode.TreeItem): URI {
|
||||
if (extensionTreeItem.iconPath && !(extensionTreeItem.iconPath instanceof ThemeIcon) && extensionTreeItem.iconPath['dark']) {
|
||||
return this.getIconPath(extensionTreeItem.iconPath['dark']);
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
|
||||
private getIconPath(iconPath: string | URI): string {
|
||||
private getIconPath(iconPath: string | URI): URI {
|
||||
if (iconPath instanceof URI) {
|
||||
return iconPath.toString();
|
||||
return iconPath;
|
||||
}
|
||||
return URI.file(iconPath).toString();
|
||||
return URI.file(iconPath);
|
||||
}
|
||||
|
||||
private addNodeToCache(element: T, node: TreeNode): void {
|
||||
|
||||
Reference in New Issue
Block a user