ux: use Grid instead of DockPanel

This commit is contained in:
leo 2025-01-14 20:39:44 +08:00
parent 5b425c4ed0
commit c8aecc00cc
No known key found for this signature in database

View file

@ -19,10 +19,10 @@
<v:Avatar Grid.Column="0" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Author}"/>
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Author}"/>
<DockPanel Margin="0,10,0,8" ClipToBounds="True">
<SelectableTextBlock Text="{Binding Author.Name}" Margin="2,0,8,0"/>
<SelectableTextBlock Text="{Binding Author.Email}" ToolTip.Tip="{Binding Author.Email}" Foreground="{DynamicResource Brush.FG2}" TextTrimming="CharacterEllipsis"/>
</DockPanel>
<Grid Margin="0,10,0,8" ColumnDefinitions="Auto,*" ClipToBounds="True">
<SelectableTextBlock Grid.Column="0" Text="{Binding Author.Name}" Margin="2,0,8,0"/>
<SelectableTextBlock Grid.Column="1" Text="{Binding Author.Email}" ToolTip.Tip="{Binding Author.Email}" Foreground="{DynamicResource Brush.FG2}" TextTrimming="CharacterEllipsis"/>
</Grid>
<SelectableTextBlock Text="{Binding AuthorTimeStr}"
Margin="2,0,0,0"
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Decrease}}"
@ -35,10 +35,10 @@
<v:Avatar Grid.Column="0" Width="64" Height="64" HorizontalAlignment="Right" User="{Binding Committer}"/>
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
<TextBlock Classes="group_header_label" Margin="0" Text="{DynamicResource Text.CommitDetail.Info.Committer}"/>
<DockPanel Margin="0,10,0,8" ClipToBounds="True">
<SelectableTextBlock Text="{Binding Committer.Name}" Margin="2,0,8,0"/>
<SelectableTextBlock Text="{Binding Committer.Email}" ToolTip.Tip="{Binding Committer.Email}" Foreground="{DynamicResource Brush.FG2}" TextTrimming="CharacterEllipsis"/>
</DockPanel>
<Grid Margin="0,10,0,8" ColumnDefinitions="Auto,*" ClipToBounds="True">
<SelectableTextBlock Grid.Column="0" Text="{Binding Committer.Name}" Margin="2,0,8,0"/>
<SelectableTextBlock Grid.Column="1" Text="{Binding Committer.Email}" ToolTip.Tip="{Binding Committer.Email}" Foreground="{DynamicResource Brush.FG2}" TextTrimming="CharacterEllipsis"/>
</Grid>
<SelectableTextBlock Text="{Binding CommitterTimeStr}"
Margin="2,0,0,0"
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Decrease}}"