diff --git a/src/Converters/ObjectConverters.cs b/src/Converters/ObjectConverters.cs deleted file mode 100644 index 8b11ef93..00000000 --- a/src/Converters/ObjectConverters.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Avalonia.Data.Converters; - -namespace SourceGit.Converters -{ - public static class ObjectConverters - { - public static readonly FuncValueConverter IsNull = - new FuncValueConverter(v => v == null); - - public static readonly FuncValueConverter IsNotNull = - new FuncValueConverter(v => v != null); - } -} diff --git a/src/ViewModels/DiffContext.cs b/src/ViewModels/DiffContext.cs index 7c2aab14..e0c9de25 100644 --- a/src/ViewModels/DiffContext.cs +++ b/src/ViewModels/DiffContext.cs @@ -8,7 +8,6 @@ using Avalonia.Media.Imaging; using Avalonia.Threading; using CommunityToolkit.Mvvm.ComponentModel; -using SourceGit.Models; namespace SourceGit.ViewModels { @@ -74,10 +73,7 @@ namespace SourceGit.ViewModels set => SetProperty(ref _fileModeDiff, value); } - public TextTrimming PathTrimming - { - get => _pathTrimming; - } + public TextTrimming PathTrimming { get; } = new TextLeadingPrefixTrimming("...", 20); public DiffContext(string repo, Models.DiffOption option, DiffContext previous = null) { @@ -199,6 +195,5 @@ namespace SourceGit.ViewModels private object _content = null; private Vector _syncScrollOffset = Vector.Zero; private Models.FileModeDiff _fileModeDiff = null; - private TextTrimming _pathTrimming = new TextLeadingPrefixTrimming("...", 20); } } diff --git a/src/Views/DiffView.axaml b/src/Views/DiffView.axaml index cb56de34..568d47b8 100644 --- a/src/Views/DiffView.axaml +++ b/src/Views/DiffView.axaml @@ -27,7 +27,7 @@ - +