Only reset theme icon color in treeview once
This commit is contained in:
parent
4b0855f292
commit
85534c004c
1 changed files with 2 additions and 5 deletions
|
@ -833,6 +833,8 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
|||
|
||||
// reset
|
||||
templateData.actionBar.clear();
|
||||
templateData.icon.style.color = '';
|
||||
|
||||
if (resource || this.isFileKindThemeIcon(node.themeIcon)) {
|
||||
const fileDecorations = this.configurationService.getValue<{ colors: boolean, badges: boolean }>('explorer.decorations');
|
||||
const labelResource = resource ? resource : URI.parse('missing:_icon_resource');
|
||||
|
@ -858,18 +860,13 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
|
|||
if (iconUrl) {
|
||||
templateData.icon.className = 'custom-view-tree-node-item-icon';
|
||||
templateData.icon.style.backgroundImage = DOM.asCSSUrl(iconUrl);
|
||||
templateData.icon.style.color = '';
|
||||
} else {
|
||||
let iconClass: string | undefined;
|
||||
if (node.themeIcon && !this.isFileKindThemeIcon(node.themeIcon)) {
|
||||
iconClass = ThemeIcon.asClassName(node.themeIcon);
|
||||
if (node.themeIcon.color) {
|
||||
templateData.icon.style.color = this.themeService.getColorTheme().getColor(node.themeIcon.color.id)?.toString() ?? '';
|
||||
} else {
|
||||
templateData.icon.style.color = '';
|
||||
}
|
||||
} else {
|
||||
templateData.icon.style.color = '';
|
||||
}
|
||||
templateData.icon.className = iconClass ? `custom-view-tree-node-item-icon ${iconClass}` : '';
|
||||
templateData.icon.style.backgroundImage = '';
|
||||
|
|
Loading…
Reference in a new issue