mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
code_review: PR #208
* make sure there's only one radio button that will change the binding value * remove unused code
This commit is contained in:
parent
b50ae21699
commit
d43f88da03
2 changed files with 2 additions and 21 deletions
|
@ -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<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();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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}">
|
||||
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Home}"/>
|
||||
</RadioButton>
|
||||
|
||||
|
|
Loading…
Reference in a new issue