mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 14:15:00 +00:00
feature: add two view mode for image diff - side-by-side and blend
This commit is contained in:
parent
d3d6889e25
commit
8e88df92b3
10 changed files with 490 additions and 231 deletions
19
src/Converters/DoubleConverters.cs
Normal file
19
src/Converters/DoubleConverters.cs
Normal 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") + "%");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue