From 2cac661676cf235389861bda44f2c99622c17075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:10:20 +0200 Subject: [PATCH] Split line counters in a new view --- src/Views/CommitBaseInfo.axaml | 23 ++--------------------- src/Views/LinesChanged.axaml | 28 ++++++++++++++++++++++++++++ src/Views/LinesChanged.axaml.cs | 31 +++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 21 deletions(-) create mode 100644 src/Views/LinesChanged.axaml create mode 100644 src/Views/LinesChanged.axaml.cs diff --git a/src/Views/CommitBaseInfo.axaml b/src/Views/CommitBaseInfo.axaml index 6162556e..b73e6e8d 100644 --- a/src/Views/CommitBaseInfo.axaml +++ b/src/Views/CommitBaseInfo.axaml @@ -183,27 +183,8 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Views/LinesChanged.axaml.cs b/src/Views/LinesChanged.axaml.cs new file mode 100644 index 00000000..28576ab0 --- /dev/null +++ b/src/Views/LinesChanged.axaml.cs @@ -0,0 +1,31 @@ +using Avalonia; +using Avalonia.Controls; + +namespace SourceGit.Views +{ + public partial class LinesChanged : UserControl + { + public static readonly StyledProperty AddedCountProperty = + AvaloniaProperty.Register(nameof(AddedCount)); + + public static readonly StyledProperty RemovedCountProperty = + AvaloniaProperty.Register(nameof(RemovedCount)); + + public int AddedCount + { + get => GetValue(AddedCountProperty); + set => SetValue(AddedCountProperty, value); + } + + public int RemovedCount + { + get => GetValue(RemovedCountProperty); + set => SetValue(RemovedCountProperty, value); + } + + public LinesChanged() + { + InitializeComponent(); + } + } +}