ux: show tooltip at right of hovered item in repository's left side bar (#1317)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-16 10:47:38 +08:00
parent e4490d87dc
commit d299469613
No known key found for this signature in database
3 changed files with 23 additions and 6 deletions

View file

@ -32,11 +32,13 @@
<ListBox.ItemTemplate>
<DataTemplate DataType="vm:BranchTreeNode">
<Border Background="Transparent" PointerPressed="OnNodePointerPressed">
<Border Background="Transparent"
PointerPressed="OnNodePointerPressed"
ToolTip.Tip="{Binding Tooltip}"
ToolTip.Placement="Right">
<Grid Height="24"
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
ColumnDefinitions="16,*"
ToolTip.Tip="{Binding Tooltip}">
ColumnDefinitions="16,*">
<!-- Tree Expander -->
<v:BranchTreeNodeToggleButton Grid.Column="0"

View file

@ -84,7 +84,12 @@
<ListBox.ItemTemplate>
<DataTemplate DataType="vm:SubmoduleTreeNode">
<Border Height="24" Background="Transparent" DoubleTapped="OnDoubleTappedNode" ContextRequested="OnRowContextRequested" ToolTip.Tip="{Binding Module}">
<Border Height="24"
Background="Transparent"
DoubleTapped="OnDoubleTappedNode"
ContextRequested="OnRowContextRequested"
ToolTip.Tip="{Binding Module}"
ToolTip.Placement="Right">
<Grid ColumnDefinitions="16,Auto,*,Auto,Auto"
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
VerticalAlignment="Center">

View file

@ -26,7 +26,13 @@
SelectionChanged="OnRowSelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate DataType="vm:TagTreeNode">
<Border Height="24" Background="Transparent" PointerPressed="OnRowPointerPressed" DoubleTapped="OnDoubleTappedNode" ContextRequested="OnRowContextRequested" ToolTip.Tip="{Binding ToolTip}">
<Border Height="24"
Background="Transparent"
PointerPressed="OnRowPointerPressed"
DoubleTapped="OnDoubleTappedNode"
ContextRequested="OnRowContextRequested"
ToolTip.Tip="{Binding ToolTip}"
ToolTip.Placement="Right">
<Border.DataTemplates>
<DataTemplate DataType="vm:TagTreeNodeToolTip">
<StackPanel Orientation="Vertical" Spacing="6">
@ -86,7 +92,11 @@
SelectionChanged="OnRowSelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate DataType="m:Tag">
<Border Height="24" Background="Transparent" PointerPressed="OnRowPointerPressed" ContextRequested="OnRowContextRequested">
<Border Height="24"
Background="Transparent"
PointerPressed="OnRowPointerPressed"
ContextRequested="OnRowContextRequested"
ToolTip.Placement="Right">
<ToolTip.Tip>
<StackPanel Orientation="Vertical" Spacing="6">
<StackPanel Orientation="Horizontal">