sourcegit/src/Converters/BoolConverters.cs
leo 599ba01f20 ux: re-design Views.Repository
* It's better to move the `Navigate to HEAD` button to the top-right of this page.
* Icons and alignments
2024-04-18 10:50:14 +08:00

14 lines
474 B
C#

using Avalonia.Data.Converters;
using Avalonia.Media;
namespace SourceGit.Converters
{
public static class BoolConverters
{
public static readonly FuncValueConverter<bool, double> HalfIfFalse =
new FuncValueConverter<bool, double>(x => x ? 1 : 0.5);
public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue =
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular);
}
}