提交 2a55b4df 编写于 作者: B Benjamin Pasero

tree - show outline also in case of focus but no focused item

上级 ab5e98b2
......@@ -693,6 +693,9 @@ export class TreeView extends HeightMap implements IScrollable {
case 'item:removeTrait':
this.onItemRemoveTrait(data);
break;
case 'focus':
this.onModelFocusChange();
break;
}
}
......@@ -1049,6 +1052,10 @@ export class TreeView extends HeightMap implements IScrollable {
}
}
private onModelFocusChange(): void {
DOM.toggleClass(this.domNode, 'no-item-focus', !this.model || !this.model.getFocus());
}
// HeightMap "events"
public onInsertItem(item: ViewItem): void {
......
......@@ -67,8 +67,9 @@
outline: 0; /* tree indicates focus not via outline but through the focussed item */
}
.monaco-shell .monaco-tree.focused .monaco-tree-rows:empty {
outline: 2px auto -webkit-focus-ring-color; /* we still need to handle the empty tree case */
.monaco-shell .monaco-tree.focused .monaco-tree-rows:empty,
.monaco-shell .monaco-tree.focused.no-item-focus .monaco-tree-rows {
outline: 2px auto -webkit-focus-ring-color; /* we still need to handle the empty tree or no focus item case */
outline-offset: -2px;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册