diff --git a/src/ViewModels/DiffContext.cs b/src/ViewModels/DiffContext.cs index 19449cc9..7c2aab14 100644 --- a/src/ViewModels/DiffContext.cs +++ b/src/ViewModels/DiffContext.cs @@ -3,6 +3,7 @@ using System.IO; using System.Threading.Tasks; using Avalonia; +using Avalonia.Media; using Avalonia.Media.Imaging; using Avalonia.Threading; @@ -73,6 +74,11 @@ namespace SourceGit.ViewModels set => SetProperty(ref _fileModeDiff, value); } + public TextTrimming PathTrimming + { + get => _pathTrimming; + } + public DiffContext(string repo, Models.DiffOption option, DiffContext previous = null) { _repo = repo; @@ -193,5 +199,6 @@ 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 80e9f56c..cb56de34 100644 --- a/src/Views/DiffView.axaml +++ b/src/Views/DiffView.axaml @@ -22,8 +22,8 @@ - +