diff --git a/src/vs/workbench/browser/parts/views/media/views.css b/src/vs/workbench/browser/parts/views/media/views.css index 3cda0e9caf637f4780a310bbb5cf99e577fe7436..852de760a411a7616dcb1548dfa12562ccec9eac 100644 --- a/src/vs/workbench/browser/parts/views/media/views.css +++ b/src/vs/workbench/browser/parts/views/media/views.css @@ -20,17 +20,6 @@ content: ' '; } -.file-icon-themable-tree.align-icons-and-twisties .monaco-tree-row:not(.has-children) .content::before, -.file-icon-themable-tree.hide-arrows .monaco-tree-row .content::before { - display: none; -} - -/** Show the twistie content if the parent has opt in icon **/ -.tree-explorer-viewlet-tree-view.file-icon-themable-tree.align-icons-and-twisties .monaco-tree-row:not(.has-children) .content.parent-has-icon::before, -.tree-explorer-viewlet-tree-view.file-icon-themable-tree.hide-arrows .monaco-tree-row .content.parent-has-icon::before { - display: inline-block; -} - .file-icon-themable-tree .monaco-tree-row.has-children.expanded .content::before { background-image: url("expanded.svg"); } @@ -56,6 +45,17 @@ background-image: url("collapsed-hc.svg"); } +.file-icon-themable-tree.align-icons-and-twisties .monaco-tree-row:not(.has-children) .content::before, +.file-icon-themable-tree.hide-arrows .monaco-tree-row .content::before { + display: none; +} + +/** Show the twistie content if the parent has opt in icon **/ +.tree-explorer-viewlet-tree-view.file-icon-themable-tree.align-icons-and-twisties .monaco-tree-row:not(.has-children) .content.parent-has-icon::before, +.tree-explorer-viewlet-tree-view.file-icon-themable-tree.hide-arrows .monaco-tree-row .content.has-icon::before { + display: inline-block; +} + .tree-explorer-viewlet-tree-view .monaco-tree .monaco-tree-row .custom-view-tree-node-item { display: flex; height: 22px; diff --git a/src/vs/workbench/browser/parts/views/treeView.ts b/src/vs/workbench/browser/parts/views/treeView.ts index 9a2137363ef47152919caef09c182e16cd44d30f..4a461149977247c5d8f947a737ffd8205ec7bec1 100644 --- a/src/vs/workbench/browser/parts/views/treeView.ts +++ b/src/vs/workbench/browser/parts/views/treeView.ts @@ -342,6 +342,7 @@ class TreeRenderer implements IRenderer { // Fix when the theme do not show folder icons but parent has opt in icon. DOM.toggleClass(templateData.container, 'parent-has-icon', this.hasParentHasOptInIcon(node, tree)); + DOM.toggleClass(templateData.container, 'has-icon', !!icon); } private hasParentHasOptInIcon(node: ITreeItem, tree: ITree): boolean {