From ab006d9da60ead134c558d42cb237ef60853c178 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 7 Nov 2020 01:40:16 -0500 Subject: [PATCH] Changes to ThemeIcon --- src/views/nodes/remoteNode.ts | 7 ++----- src/views/nodes/remotesNode.ts | 9 ++------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/views/nodes/remoteNode.ts b/src/views/nodes/remoteNode.ts index 6e60303..e849509 100644 --- a/src/views/nodes/remoteNode.ts +++ b/src/views/nodes/remoteNode.ts @@ -1,5 +1,5 @@ 'use strict'; -import { TreeItem, TreeItemCollapsibleState } from 'vscode'; +import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { BranchNode } from './branchNode'; import { BranchOrTagFolderNode } from './branchOrTagFolderNode'; import { MessageNode } from './common'; @@ -134,10 +134,7 @@ export class RemoteNode extends ViewNode { : '' }${this.remote.path}`; item.contextValue = ContextValues.Remote; - item.iconPath = { - dark: Container.context.asAbsolutePath('images/dark/icon-remote.svg'), - light: Container.context.asAbsolutePath('images/light/icon-remote.svg'), - }; + item.iconPath = new ThemeIcon('cloud'); item.tooltip = `${this.remote.name} (${this.remote.domain})\n${this.remote.path}\n`; } diff --git a/src/views/nodes/remotesNode.ts b/src/views/nodes/remotesNode.ts index 229b0d8..c5640de 100644 --- a/src/views/nodes/remotesNode.ts +++ b/src/views/nodes/remotesNode.ts @@ -1,7 +1,6 @@ 'use strict'; -import { TreeItem, TreeItemCollapsibleState } from 'vscode'; +import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { MessageNode } from './common'; -import { Container } from '../../container'; import { Repository } from '../../git/git'; import { GitUri } from '../../git/gitUri'; import { RemoteNode } from './remoteNode'; @@ -44,11 +43,7 @@ export class RemotesNode extends ViewNode { const item = new TreeItem('Remotes', TreeItemCollapsibleState.Collapsed); item.id = this.id; item.contextValue = ContextValues.Remotes; - - item.iconPath = { - dark: Container.context.asAbsolutePath('images/dark/icon-remote.svg'), - light: Container.context.asAbsolutePath('images/light/icon-remote.svg'), - }; + item.iconPath = new ThemeIcon('cloud'); return item; }