ux: tooltip of commit signing status icon

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-10-30 15:10:26 +08:00
parent 195325187d
commit fe03512c5c
No known key found for this signature in database
2 changed files with 7 additions and 8 deletions

View file

@ -7,6 +7,7 @@ namespace SourceGit.Models
public char VerifyResult { get; init; } = 'N'; public char VerifyResult { get; init; } = 'N';
public string Signer { get; init; } = string.Empty; public string Signer { get; init; } = string.Empty;
public string Key { get; init; } = string.Empty; public string Key { get; init; } = string.Empty;
public bool HasSigner => !string.IsNullOrEmpty(Signer);
public IBrush Brush public IBrush Brush
{ {

View file

@ -85,14 +85,12 @@
<ToolTip.Tip> <ToolTip.Tip>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical">
<TextBlock Margin="0,0,0,12" Text="{Binding ToolTip}"/> <TextBlock Margin="0,0,0,12" Text="{Binding ToolTip}"/>
<TextBlock Margin="0,0,0,2" IsVisible="{Binding Signer, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"> <Grid ColumnDefinitions="Auto,8,Auto" RowDefinitions="Auto,Auto">
<Run Text="Signer:"/> <TextBlock Grid.Row="0" Grid.Column="0" Text="Signer:" IsVisible="{Binding HasSigner}"/>
<Run Text="{Binding Signer}"/> <TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding Signer}" IsVisible="{Binding HasSigner}"/>
</TextBlock> <TextBlock Grid.Row="1" Grid.Column="0" Text="Key:"/>
<TextBlock> <TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding Key}"/>
<Run Text="KEY:"/> </Grid>
<Run Text="{Binding Key}"/>
</TextBlock>
</StackPanel> </StackPanel>
</ToolTip.Tip> </ToolTip.Tip>
<Path Width="14" Height="14" Data="{StaticResource Icons.Verified}" Fill="{Binding Brush}"/> <Path Width="14" Height="14" Data="{StaticResource Icons.Verified}" Fill="{Binding Brush}"/>