refactor: re-design toolbar of Views.DiffView

This commit is contained in:
leo 2024-04-14 12:27:09 +08:00
parent 7bf6793a11
commit ab26bb83e9
7 changed files with 47 additions and 69 deletions

View file

@ -11,13 +11,5 @@ namespace SourceGit.Converters
public static readonly FuncValueConverter<string, string> PureDirectoryName =
new FuncValueConverter<string, string>(fullpath => Path.GetDirectoryName(fullpath) ?? "");
public static readonly FuncValueConverter<string, string> TruncateIfTooLong =
new FuncValueConverter<string, string>(fullpath =>
{
if (fullpath.Length <= 50)
return fullpath;
return fullpath.Substring(0, 20) + ".../" + Path.GetFileName(fullpath);
});
}
}