mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[Image Resizer]Localize units and resize mode (#31140)
* [Image Resizer] Do not use Culture when getting resources with ResourceLoader * Localize fit and unit comboboxes * Update font * Address PR comments
This commit is contained in:
@@ -35,7 +35,10 @@ namespace ImageResizer.Views
|
||||
.Append(parameter);
|
||||
}
|
||||
|
||||
var targetValue = Resources.ResourceManager.GetString(builder.ToString(), culture);
|
||||
// Fixes #16792 - Looks like culture defaults to en-US, so wrong resource is being fetched.
|
||||
#pragma warning disable CA1304 // Specify CultureInfo
|
||||
var targetValue = Resources.ResourceManager.GetString(builder.ToString());
|
||||
#pragma warning restore CA1304 // Specify CultureInfo
|
||||
|
||||
if (toLower)
|
||||
{
|
||||
|
||||
@@ -178,8 +178,17 @@
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Resize_Type}"
|
||||
ItemsSource="{Binding Source={StaticResource ResizeFitValues}}"
|
||||
Text="{Binding ElementName=SizeComboBox, Path=SelectedValue.Fit, Mode=TwoWay}" />
|
||||
ItemsSource="{Binding ResizeFitValues, Mode=OneWay}"
|
||||
SelectedIndex="0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="sys:Enum">
|
||||
<TextBlock
|
||||
Margin="4,0,0,0"
|
||||
FontSize="14"
|
||||
Text="{Binding {}, Converter={StaticResource EnumValueConverter}}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<ui:SymbolIcon
|
||||
Grid.Row="2"
|
||||
@@ -196,8 +205,17 @@
|
||||
Grid.Row="2"
|
||||
Grid.Column="4"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Unit}"
|
||||
ItemsSource="{Binding Source={StaticResource ResizeUnitValues}}"
|
||||
Text="{Binding ElementName=SizeComboBox, Path=SelectedValue.Unit, Mode=TwoWay}" />
|
||||
ItemsSource="{Binding ResizeUnitValues, Mode=OneWay}"
|
||||
SelectedIndex="0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="sys:Enum">
|
||||
<TextBlock
|
||||
Margin="4,0,0,0"
|
||||
FontSize="14"
|
||||
Text="{Binding {}, Converter={StaticResource EnumValueConverter}}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user