提交 5755810a 编写于 作者: S Sandeep Somavarapu

Fix #42097

上级 84cd58b2
......@@ -379,6 +379,10 @@ class Aligner extends Disposable {
}
private hasToAlignWithTwisty(): boolean {
if (this.hasParentHasIcon()) {
return false;
}
const fileIconTheme = this.themeService.getFileIconTheme();
if (!(fileIconTheme.hasFileIcons && !fileIconTheme.hasFolderIcons)) {
return false;
......@@ -407,6 +411,21 @@ class Aligner extends Disposable {
const parent: ITreeItem = this.tree.getNavigator(this.node).parent() || this.tree.getInput();
return parent.children;
}
private hasParentHasIcon(): boolean {
const parent = this.tree.getNavigator(this.node).parent() || this.tree.getInput();
const icon = this.themeService.getTheme().type === LIGHT ? parent.icon : parent.iconDark;
if (icon) {
return true;
}
if (parent.resourceUri) {
const fileIconTheme = this.themeService.getFileIconTheme();
if (fileIconTheme.hasFileIcons && fileIconTheme.hasFolderIcons) {
return true;
}
}
return false;
}
}
class TreeController extends WorkbenchTreeController {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册