code_style: rename BoolConverters.BoolToStarOrAutoGridLength to BoolConverters.ToStarOrAutoGridLength

This commit is contained in:
leo 2024-05-03 11:43:33 +08:00
parent 9b10a867cc
commit 9ae926db9f
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ namespace SourceGit.Converters
public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue = public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue =
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular); new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular);
public static readonly FuncValueConverter<bool, GridLength> BoolToStarOrAutoGridLength = public static readonly FuncValueConverter<bool, GridLength> ToStarOrAutoGridLength =
new(value => value ? new GridLength(1, GridUnitType.Star) : new GridLength(1, GridUnitType.Auto)); new(value => value ? new GridLength(1, GridUnitType.Star) : new GridLength(1, GridUnitType.Auto));
} }
} }

View file

@ -14,7 +14,7 @@
<!-- Author & Committer --> <!-- Author & Committer -->
<Grid Margin="0,8"> <Grid Margin="0,8">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding IsCommitterVisible, Converter={x:Static c:BoolConverters.BoolToStarOrAutoGridLength}}"/> <ColumnDefinition Width="{Binding IsCommitterVisible, Converter={x:Static c:BoolConverters.ToStarOrAutoGridLength}}"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Author --> <!-- Author -->