mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 13:20:30 +08:00
ux: layout for SHA and TIME column in HISTORY page
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Threading;
|
||||
|
||||
namespace SourceGit.Views
|
||||
@@ -51,9 +52,15 @@ namespace SourceGit.Views
|
||||
SetCurrentValue(TextProperty, GetDisplayText());
|
||||
|
||||
if (ShowAsDateTime)
|
||||
{
|
||||
StopTimer();
|
||||
HorizontalAlignment = HorizontalAlignment.Left;
|
||||
}
|
||||
else
|
||||
{
|
||||
StartTimer();
|
||||
HorizontalAlignment = HorizontalAlignment.Center;
|
||||
}
|
||||
}
|
||||
else if (change.Property == DateTimeFormatProperty)
|
||||
{
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
User="{Binding Author}"
|
||||
Opacity="{Binding Opacity}"/>
|
||||
|
||||
<Border Grid.Column="1" Padding="8,0,0,0" ClipToBounds="True">
|
||||
<Border Grid.Column="1" Padding="8,0,4,0" ClipToBounds="True">
|
||||
<TextBlock Classes="primary"
|
||||
Text="{Binding Author.Name}"
|
||||
FontWeight="{Binding FontWeight}"
|
||||
@@ -188,18 +188,16 @@
|
||||
</Grid>
|
||||
|
||||
<!-- SHA -->
|
||||
<Border Grid.Column="2" Padding="4,0" IsHitTestVisible="False" ClipToBounds="True">
|
||||
<Border Grid.Column="2" Padding="8,0,0,0" IsHitTestVisible="False" ClipToBounds="True">
|
||||
<TextBlock Classes="primary"
|
||||
Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}"
|
||||
HorizontalAlignment="Center"
|
||||
FontWeight="{Binding FontWeight}"
|
||||
Opacity="{Binding Opacity}"/>
|
||||
</Border>
|
||||
|
||||
<!-- TIME -->
|
||||
<Border Grid.Column="3" Padding="4,0,8,0" ClipToBounds="True" IsHitTestVisible="False">
|
||||
<Border Grid.Column="3" Padding="8,0" ClipToBounds="True" IsHitTestVisible="False">
|
||||
<v:CommitTimeTextBlock Classes="primary"
|
||||
HorizontalAlignment="Center"
|
||||
FontWeight="{Binding FontWeight}"
|
||||
Opacity="{Binding Opacity}"
|
||||
UseAuthorTime="{Binding Source={x:Static vm:Preferences.Instance}, Path=ShowAuthorTimeInGraph, Mode=OneWay}"
|
||||
|
||||
Reference in New Issue
Block a user