ux: new design for repository left side bar

This commit is contained in:
leo 2024-06-25 15:03:21 +08:00
parent 414f7fad2c
commit 432f5a98da
No known key found for this signature in database
8 changed files with 495 additions and 449 deletions

View file

@ -1,4 +1,7 @@
using Avalonia.Data.Converters;
using System;
using System.Globalization;
using Avalonia.Data.Converters;
using Avalonia.Media;
namespace SourceGit.Converters
@ -13,5 +16,21 @@ namespace SourceGit.Converters
public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue =
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular);
public class InverseConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return !(bool)value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return !(bool)value;
}
}
public static readonly InverseConverter Inverse = new InverseConverter();
}
}