feature: show tooltip of parent commit when hover the parent SHA

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-12 17:59:50 +08:00
parent 1f158eeded
commit 6e4f971733
No known key found for this signature in database
3 changed files with 52 additions and 1 deletions

View file

@ -117,7 +117,28 @@
TextDecorations="Underline"
Cursor="Hand"
Margin="0,0,16,0"
PointerPressed="OnSHAPressed"/>
PointerEntered="OnSHAPointerEntered"
PointerPressed="OnSHAPressed">
<TextBlock.Styles>
<Style Selector="ToolTip">
<Setter Property="MaxWidth" Value="800"/>
</Style>
</TextBlock.Styles>
<TextBlock.DataTemplates>
<DataTemplate DataType="m:Commit">
<StackPanel MinWidth="400" Orientation="Vertical">
<Grid ColumnDefinitions="Auto,*,Auto">
<v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/>
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
</Grid>
<TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" />
</StackPanel>
</DataTemplate>
</TextBlock.DataTemplates>
</TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>