diff --git a/src/Converters/BoolConverters.cs b/src/Converters/BoolConverters.cs index e372eaa9..2eb8c60a 100644 --- a/src/Converters/BoolConverters.cs +++ b/src/Converters/BoolConverters.cs @@ -1,7 +1,4 @@ -using System; -using System.Globalization; - -using Avalonia.Data.Converters; +using Avalonia.Data.Converters; using Avalonia.Media; namespace SourceGit.Converters @@ -16,21 +13,5 @@ namespace SourceGit.Converters public static readonly FuncValueConverter BoldIfTrue = new FuncValueConverter(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(); - } } diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml index 8fac44e0..82e63cb9 100644 --- a/src/Views/Repository.axaml +++ b/src/Views/Repository.axaml @@ -182,7 +182,7 @@ Classes="icon_button" Width="48" GroupName="SearchGroup" - IsChecked="{Binding IsSearching, Mode=TwoWay, Converter={x:Static c:BoolConverters.Inverse}}"> + IsChecked="{Binding !IsSearching, Mode=OneWay}">