未验证 提交 ece81412 编写于 作者: A Alex Ross 提交者: GitHub

Reworks alignment logic to handle certain nesting cases (#85657)

* Removes short-circuit that causes mis-alignment

* Better alignment fix of items w/ icons

Items with an icon that belong to a parent with an icon, but have siblings with children but without icons should now be aligned properly
Co-authored-by: NAlex Ross <alros@microsoft.com>
......@@ -906,7 +906,7 @@ class Aligner extends Disposable {
if (this._tree) {
const parent: ITreeItem = this._tree.getParentElement(treeItem) || this._tree.getInput();
if (this.hasIcon(parent)) {
return false;
return !!parent.children && parent.children.some(c => c.collapsibleState !== TreeItemCollapsibleState.None && !this.hasIcon(c));
}
return !!parent.children && parent.children.every(c => c.collapsibleState === TreeItemCollapsibleState.None || !this.hasIcon(c));
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册