diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index cc32cc4a..218be9a3 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -137,6 +137,7 @@ PARENTS REFS SHA + STATS Open in Browser Enter commit subject Description diff --git a/src/Views/CommitBaseInfo.axaml b/src/Views/CommitBaseInfo.axaml index 96d40383..55342d18 100644 --- a/src/Views/CommitBaseInfo.axaml +++ b/src/Views/CommitBaseInfo.axaml @@ -51,7 +51,7 @@ - + @@ -182,9 +182,13 @@ UseGraphColor="False"/> + + + + - - + + + + + + + + + + + + + + + + + diff --git a/src/Views/LinesChanged.axaml.cs b/src/Views/LinesChanged.axaml.cs new file mode 100644 index 00000000..aa2c8a60 --- /dev/null +++ b/src/Views/LinesChanged.axaml.cs @@ -0,0 +1,41 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace SourceGit.Views +{ + public partial class LinesChanged : UserControl + { + public static readonly DirectProperty AddedLinesProperty = + AvaloniaProperty.RegisterDirect(nameof(AddedLines), o => o.AddedLines); + + public static readonly DirectProperty RemovedLinesProperty = + AvaloniaProperty.RegisterDirect(nameof(RemovedLines), o => o.RemovedLines); + + private int _addedLines; + private int _removedLines; + + public int AddedLines + { + get => _addedLines; + set => SetAndRaise(AddedLinesProperty, ref _addedLines, value); + } + + public int RemovedLines + { + get => _removedLines; + set => SetAndRaise(RemovedLinesProperty, ref _removedLines, value); + } + + public LinesChanged() + { + InitializeComponent(); + this.DataContext = this; + } + + private void InitializeComponent() + { + AvaloniaXamlLoader.Load(this); + } + } +}