8000 ux: show tooltip at right of hovered item in repository's left side b… · sourcegit-scm/sourcegit@d299469 · GitHub
[go: up one dir, main page]

Skip to content

Commit d299469

Browse files
committed
ux: show tooltip at right of hovered item in repository's left side bar (#1317)
Signed-off-by: leo <longshuang@msn.cn>
1 parent e4490d8 commit d299469

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

src/Views/BranchTree.axaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232

3333
<ListBox.ItemTemplate>
3434
<DataTemplate DataType="vm:BranchTreeNode">
35-
<Border Background="Transparent" PointerPressed="OnNodePointerPressed">
35+
<Border Background="Transparent"
36+
PointerPressed="OnNodePointerPressed"
37+
ToolTip.Tip="{Binding Tooltip}"
38+
ToolTip.Placement="Right">
3639
<Grid Height="24"
3740
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
38-
ColumnDefinitions="16,*"
39-
ToolTip.Tip="{Binding Tooltip}">
41+
ColumnDefinitions="16,*">
4042

4143
<!-- Tree Expander -->
4244
<v:BranchTreeNodeToggleButton Grid.Column="0"

src/Views/SubmodulesView.axaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@
8484

8585
<ListBox.ItemTemplate>
8686
<DataTemplate DataType="vm:SubmoduleTreeNode">
87-
<Border Height="24" Background="Transparent" DoubleTapped="OnDoubleTappedNode" ContextRequested="OnRowContextRequested" ToolTip.Tip="{Binding Module}">
87+
<Border Height="24"
88+
Background="Transparent"
89+
DoubleTapped="OnDoubleTappedNode"
90+
ContextRequested="OnRowContextRequested"
91+
ToolTip.Tip="{Binding Module}"
92+
ToolTip.Placement="Right">
8893
<Grid ColumnDefinitions="16,Auto,*,Auto,Auto"
8994
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
9095
VerticalAlignment="Center">

src/Views/TagsView.axaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@
2626
SelectionChanged="OnRowSelectionChanged">
2727
<ListBox.ItemTemplate>
2828
<DataTemplate DataType="vm:TagTreeNode">
29-
<Border Height="24" Background="Transparent" PointerPressed="OnRowPointerPressed" DoubleTapped="OnDoubleTappedNode" ContextRequested="OnRowContextRequested" ToolTip.Tip="{Binding ToolTip}">
29+
<Border Height="24"
30+
Background="Transparent"
31+
PointerPressed="OnRowPointerPressed"
32+
DoubleTapped="OnDoubleTappedNode"
33+
ContextRequested="OnRowContextRequested"
34+
ToolTip.Tip="{Binding ToolTip}"
35+
ToolTip.Placement="Right">
3036
<Border.DataTemplates>
3137
<DataTemplate DataType="vm:TagTreeNodeToolTip">
3238
<StackPanel Orientation="Vertical" Spacing="6">
@@ -86,7 +92,11 @@
8692
SelectionChanged="OnRowSelectionChanged">
8793
<ListBox.ItemTemplate>
8894
<DataTemplate DataType="m:Tag">
89-
<Border Height="24" Background="Transparent" PointerPressed="OnRowPointerPressed" ContextRequested="OnRowContextRequested">
95+
<Border Height="24"
96+
Background="Transparent"
97+
PointerPressed="OnRowPointerPressed"
98+
ContextRequested="OnRowContextRequested"
99+
ToolTip.Placement="Right">
90100
<ToolTip.Tip>
91101
<StackPanel Orientation="Vertical" Spacing="6">
92102
<StackPanel Orientation="Horizontal">

0 commit comments

Comments
 (0)
0