feature: add two view mode for image diff - side-by-side and blend

This commit is contained in:
leo 2024-06-21 17:48:19 +08:00
parent d3d6889e25
commit 8e88df92b3
No known key found for this signature in database
10 changed files with 490 additions and 231 deletions

View file

@ -0,0 +1,19 @@
using Avalonia.Data.Converters;
namespace SourceGit.Converters
{
public static class DoubleConverters
{
public static readonly FuncValueConverter<double, double> Increase =
new FuncValueConverter<double, double>(v => v + 1.0);
public static readonly FuncValueConverter<double, double> Decrease =
new FuncValueConverter<double, double>(v => v - 1.0);
public static readonly FuncValueConverter<double, string> ToPercentage =
new FuncValueConverter<double, string>(v => (v * 100).ToString("F3") + "%");
public static readonly FuncValueConverter<double, string> OneMinusToPercentage =
new FuncValueConverter<double, string>(v => ((1.0 - v) * 100).ToString("F3") + "%");
}
}