mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-26 21:04:59 +00:00
ux: layout for SHA and TIME column in HISTORY
page
Some checks failed
Some checks failed
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
1af05b3efa
commit
f022ac24bd
2 changed files with 10 additions and 5 deletions
|
@ -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}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue