Skip to content

Commit cf211ee

Browse files
committed
Show custom tree hovers below and offset
Part of microsoft#106095
1 parent e081ad8 commit cf211ee

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/vs/workbench/contrib/views/browser/treeView.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
4343
import { IMarkdownString } from 'vs/base/common/htmlContent';
4444
import { isMacintosh } from 'vs/base/common/platform';
4545
import { ColorScheme } from 'vs/platform/theme/common/theme';
46+
import { AnchorPosition } from 'vs/base/browser/ui/contextview/contextview';
4647

4748
class Root implements ITreeItem {
4849
label = { label: 'root' };
@@ -856,10 +857,10 @@ class TreeRenderer extends Disposable implements ITreeRenderer<ITreeItem, FuzzyS
856857
targetElements: [this],
857858
dispose: () => { }
858859
};
859-
hoverOptions = { text: tooltip, target };
860+
hoverOptions = { text: tooltip, target, anchorPosition: AnchorPosition.BELOW };
860861
}
861862
if (mouseX !== undefined) {
862-
(<IHoverTarget>hoverOptions.target).x = mouseX;
863+
(<IHoverTarget>hoverOptions.target).x = mouseX + 10;
863864
}
864865
hoverService.showHover(hoverOptions);
865866
}

0 commit comments

Comments
 (0)