style<Histories, RevisionCompare>: move committer/author name to avatar's ToolTip attribute

This commit is contained in:
leo 2021-05-08 11:37:57 +08:00
parent 55dcaec729
commit da7f824508
2 changed files with 11 additions and 4 deletions

View file

@ -77,7 +77,8 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
Width="32" Height="32" Width="32" Height="32"
Email="{Binding Author.Email}" Email="{Binding Author.Email}"
FallbackLabel="{Binding Author.Name}"/> FallbackLabel="{Binding Author.Name}"
ToolTip="{Binding Author.Name}"/>
<Grid Grid.Column="1" Margin="8,0,0,0"> <Grid Grid.Column="1" Margin="8,0,0,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -89,7 +90,6 @@
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="72"/> <ColumnDefinition Width="72"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="120"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" FontSize="11"> <TextBlock Grid.Column="0" FontSize="11">
@ -98,8 +98,13 @@
</Hyperlink> </Hyperlink>
</TextBlock> </TextBlock>
<TextBlock Grid.Column="1" Text="{Binding Author.Name}" FontSize="11" Foreground="{StaticResource Brush.FG2}"/> <TextBlock
<TextBlock Grid.Column="2" Text="{Binding Author.Time}" FontSize="11" Foreground="{StaticResource Brush.FG2}"/> Grid.Column="1"
Text="{Binding Author.Time}"
FontSize="11"
Foreground="{StaticResource Brush.FG2}"
Margin="4,0,0,0"
HorizontalAlignment="Right"/>
</Grid> </Grid>
<TextBlock Grid.Row="1" Text="{Binding Subject}" Margin="0,6,0,0"/> <TextBlock Grid.Row="1" Text="{Binding Subject}" Margin="0,6,0,0"/>

View file

@ -15,12 +15,14 @@ namespace SourceGit.Views.Widgets {
public void SetData(string repo, Models.Commit start, Models.Commit end) { public void SetData(string repo, Models.Commit start, Models.Commit end) {
avatarStart.Email = start.Committer.Email; avatarStart.Email = start.Committer.Email;
avatarStart.FallbackLabel = start.Committer.Name; avatarStart.FallbackLabel = start.Committer.Name;
avatarStart.ToolTip = start.Committer.Name;
txtStartSHA.Text = start.ShortSHA; txtStartSHA.Text = start.ShortSHA;
txtStartTime.Text = start.Committer.Time; txtStartTime.Text = start.Committer.Time;
txtStartSubject.Text = start.Subject; txtStartSubject.Text = start.Subject;
avatarEnd.Email = end.Committer.Email; avatarEnd.Email = end.Committer.Email;
avatarEnd.FallbackLabel = end.Committer.Name; avatarEnd.FallbackLabel = end.Committer.Name;
avatarEnd.ToolTip = end.Committer.Name;
txtEndSHA.Text = end.ShortSHA; txtEndSHA.Text = end.ShortSHA;
txtEndTime.Text = end.Committer.Time; txtEndTime.Text = end.Committer.Time;
txtEndSubject.Text = end.Subject; txtEndSubject.Text = end.Subject;