mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
Accesibility improvements + updated colors
This commit is contained in:
@@ -123,6 +123,15 @@ namespace ImageResizer.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Filename.
|
||||
/// </summary>
|
||||
public static string Advanced_FileName_Tooltip {
|
||||
get {
|
||||
return ResourceManager.GetString("Advanced_FileName_Tooltip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Original filename.
|
||||
/// </summary>
|
||||
@@ -375,6 +384,15 @@ namespace ImageResizer.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Apply settings.
|
||||
/// </summary>
|
||||
public static string OK_Tooltip {
|
||||
get {
|
||||
return ResourceManager.GetString("OK_Tooltip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Phone.
|
||||
/// </summary>
|
||||
@@ -528,6 +546,15 @@ namespace ImageResizer.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resize pictures.
|
||||
/// </summary>
|
||||
public static string Resize_Tooltip {
|
||||
get {
|
||||
return ResourceManager.GetString("Resize_Tooltip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fill.
|
||||
/// </summary>
|
||||
|
||||
@@ -159,6 +159,9 @@
|
||||
<data name="Advanced_FileNameTokens" xml:space="preserve">
|
||||
<value>The following parameters can be used.</value>
|
||||
</data>
|
||||
<data name="Advanced_FileName_Tooltip" xml:space="preserve">
|
||||
<value>Filename</value>
|
||||
</data>
|
||||
<data name="Advanced_JpegQualityLevel" xml:space="preserve">
|
||||
<value>_JPEG quality level:</value>
|
||||
</data>
|
||||
@@ -222,6 +225,9 @@
|
||||
<data name="OK" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="OK_Tooltip" xml:space="preserve">
|
||||
<value>Apply settings</value>
|
||||
</data>
|
||||
<data name="Phone" xml:space="preserve">
|
||||
<value>Phone</value>
|
||||
</data>
|
||||
@@ -303,6 +309,9 @@
|
||||
<data name="ResizeUnit_Pixel" xml:space="preserve">
|
||||
<value>Pixels</value>
|
||||
</data>
|
||||
<data name="Resize_Tooltip" xml:space="preserve">
|
||||
<value>Resize pictures</value>
|
||||
</data>
|
||||
<data name="Results_Close" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
</data>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<system:String x:Key="Theme.ColorScheme">Accent1</system:String>
|
||||
<Color x:Key="Theme.PrimaryAccentColor">Black</Color>
|
||||
|
||||
<SolidColorBrush x:Key="SecondaryBackgroundBrush" Color="#FF3a3a3a" />
|
||||
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FF333333" />
|
||||
<SolidColorBrush x:Key="SecondaryBackgroundBrush" Color="#FF1f1f1f" />
|
||||
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FF000000" />
|
||||
<SolidColorBrush x:Key="WindowBorderBrush" Color="#FF535353"/>
|
||||
<SolidColorBrush x:Key="TitleBarSecondaryForegroundBrush" Color="#FF9a9a9a"/>
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
|
||||
<SolidColorBrush x:Key="ColorControlBackgroundBrush" Color="#FF454545"/>
|
||||
<SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FF6b6b6b" />
|
||||
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FF999999" />
|
||||
</ResourceDictionary>
|
||||
@@ -41,11 +41,11 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabControl Style="{StaticResource TabControlPivotStyle}">
|
||||
<TabItem Header="{x:Static p:Resources.Advanced_Sizes}">
|
||||
<StackPanel Margin="12">
|
||||
<StackPanel Margin="0,12,0,12">
|
||||
<!-- TODO: Allow these to be drag-and-drop reordered (issue #15) -->
|
||||
<ItemsControl Grid.IsSharedSizeScope="True" ItemsSource="{Binding Settings.Sizes}">
|
||||
<ItemsControl Grid.IsSharedSizeScope="True" TabIndex="0" ItemsSource="{Binding Settings.Sizes}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="m:ResizeSize">
|
||||
<Grid Margin="0,0,0,8">
|
||||
@@ -131,15 +131,13 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<TextBlock>
|
||||
<local:AccessibleHyperlink ControlType="Button" Command="{Binding AddSizeCommand}">
|
||||
<Run Text="{x:Static p:Resources.Advanced_CreateSize}"/>
|
||||
</local:AccessibleHyperlink>
|
||||
</TextBlock>
|
||||
<Button Margin="0,12,0,0"
|
||||
Command="{Binding AddSizeCommand}"
|
||||
Content="{x:Static p:Resources.Advanced_CreateSize}"/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static p:Resources.Advanced_Encoding}">
|
||||
<Grid Margin="12" VerticalAlignment="Top">
|
||||
<Grid Margin="0,12,0,12" VerticalAlignment="Top">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
@@ -216,7 +214,7 @@
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static p:Resources.Advanced_File}">
|
||||
<StackPanel Margin="12,8">
|
||||
<StackPanel Margin="0,12,0,12">
|
||||
<TextBlock Text="{x:Static p:Resources.Advanced_FileNameTokens}"/>
|
||||
<TextBlock Margin="0,8,0,0">
|
||||
<Run Text="%1 -"/>
|
||||
@@ -243,14 +241,16 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label HorizontalAlignment="Left"
|
||||
x:Name="fileNameTextBoxLabel"
|
||||
Content="{x:Static p:Resources.Advanced_FileName}"
|
||||
Padding="0,4,4,0"
|
||||
Target="{Binding ElementName=_fileNameTextBox}"/>
|
||||
Target="{Binding ElementName=fileNameTextBox}"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Height="23"
|
||||
TabIndex="1"
|
||||
TabIndex="0"
|
||||
TextWrapping="Wrap"
|
||||
Name="_fileNameTextBox"
|
||||
Name="fileNameTextBox"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Advanced_FileName_Tooltip}"
|
||||
Text="{Binding Settings.FileName}"/>
|
||||
</Grid>
|
||||
<Separator Margin="0,12,0,0"/>
|
||||
@@ -269,12 +269,16 @@
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button MinWidth="76"
|
||||
Click="HandleAcceptClick"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Content="{x:Static p:Resources.OK}"
|
||||
IsDefault="True"/>
|
||||
TabIndex="100"
|
||||
Click="HandleAcceptClick"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
Content="{x:Static p:Resources.OK}"
|
||||
AutomationProperties.Name="{x:Static p:Resources.OK_Tooltip}"
|
||||
IsDefault="True"/>
|
||||
|
||||
<Button MinWidth="76"
|
||||
Margin="8,0,0,0"
|
||||
TabIndex="101"
|
||||
Content="{x:Static p:Resources.Cancel}"
|
||||
IsCancel="True"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -12,12 +12,15 @@
|
||||
FontSize="16"
|
||||
Content="{x:Static p:Resources.Input_Content}"
|
||||
Target="{Binding ElementName=_selectedSizeListBox}"/>
|
||||
|
||||
<ListBox Margin="12,12,12,0"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
AutomationProperties.Name="Sizes listbox"
|
||||
ItemsSource="{Binding Settings.AllSizes}"
|
||||
Name="_selectedSizeListBox"
|
||||
SelectedIndex="{Binding Settings.SelectedSizeIndex}">
|
||||
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
@@ -26,6 +29,7 @@
|
||||
<RadioButton Margin="0,4,0,0"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Top"
|
||||
AutomationProperties.Name="{Binding Name}"
|
||||
Focusable="False"
|
||||
IsChecked="{Binding IsSelected,RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ContentPresenter/>
|
||||
@@ -33,26 +37,30 @@
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding Name}"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
|
||||
<ListBox.Resources>
|
||||
<DataTemplate DataType="{x:Type m:ResizeSize}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Name}" FontWeight="Bold"/>
|
||||
<TextBlock Text="(" Margin="4,0,0,0"/>
|
||||
<TextBlock Text="{Binding Fit,Converter={StaticResource EnumValueConverter},ConverterParameter=ThirdPersonSingular}"/>
|
||||
<TextBlock Text="{Binding Width,Converter={StaticResource AutoDoubleConverter},ConverterParameter=Auto}" Margin="4,0,0,0"/>
|
||||
<TextBlock Text="x" Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}" Margin="4,0,0,0"/>
|
||||
<TextBlock Text="{Binding Height,Converter={StaticResource AutoDoubleConverter},ConverterParameter=Auto}" Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}" Margin="4,0,0,0"/>
|
||||
<TextBlock Text="{Binding Unit,Converter={StaticResource EnumValueConverter},ConverterParameter=ToLower}" Margin="4,0,0,0"/>
|
||||
<TextBlock Text=")"/>
|
||||
<TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="{DynamicResource PrimaryForegroundBrush}"/>
|
||||
<TextBlock Text="(" Margin="4,0,0,0" Foreground="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
<TextBlock Text="{Binding Fit,Converter={StaticResource EnumValueConverter},ConverterParameter=ThirdPersonSingular}" Foreground="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
<TextBlock Text="{Binding Width,Converter={StaticResource AutoDoubleConverter},ConverterParameter=Auto}" Margin="4,0,0,0" Foreground="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
<TextBlock Text="x" Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}" Margin="4,0,0,0" Foreground="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
<TextBlock Text="{Binding Height,Converter={StaticResource AutoDoubleConverter},ConverterParameter=Auto}" Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}" Margin="4,0,0,0" Foreground="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
<TextBlock Text="{Binding Unit,Converter={StaticResource EnumValueConverter},ConverterParameter=ToLower}" Margin="4,0,0,0" Foreground="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
<TextBlock Text=")" Foreground="{DynamicResource SecondaryForegroundBrush}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type m:CustomSize}">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,-8,0,0">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" FontWeight="Bold"/>
|
||||
<ComboBox
|
||||
Margin="8,0,0,0"
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{Binding Name}"
|
||||
FontWeight="Bold"/>
|
||||
<ComboBox Margin="8,0,0,0"
|
||||
ItemsSource="{Binding Source={StaticResource ResizeFitValues}}"
|
||||
SelectedItem="{Binding Fit}">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -77,8 +85,8 @@
|
||||
</TextBox>
|
||||
<TextBlock Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}">
|
||||
</TextBlock>
|
||||
Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}"/>
|
||||
|
||||
<TextBox Width="56"
|
||||
Style="{StaticResource DefaultTextBoxStyle}"
|
||||
Margin="0,0,0,0"
|
||||
@@ -94,11 +102,9 @@
|
||||
</Binding>
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
<ComboBox
|
||||
Margin="8,0,0,0"
|
||||
<ComboBox Margin="8,0,0,0"
|
||||
ItemsSource="{Binding Source={StaticResource ResizeUnitValues}}"
|
||||
SelectedItem="{Binding Unit}"
|
||||
>
|
||||
SelectedItem="{Binding Unit}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type m:ResizeUnit}">
|
||||
<ContentPresenter Content="{Binding Converter={StaticResource EnumValueConverter}}"/>
|
||||
@@ -109,6 +115,7 @@
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
</ListBox>
|
||||
|
||||
<CheckBox Margin="12,24,12,0"
|
||||
Content="{x:Static p:Resources.Input_ShrinkOnly}"
|
||||
IsChecked="{Binding Settings.ShrinkOnly}"/>
|
||||
@@ -117,9 +124,11 @@
|
||||
<CheckBox Margin="12,4,12,0"
|
||||
Content="{x:Static p:Resources.Input_Replace}"
|
||||
IsChecked="{Binding Settings.Replace}"/>
|
||||
|
||||
<CheckBox Margin="12,4,12,0"
|
||||
Content="{x:Static p:Resources.Input_IgnoreOrientation}"
|
||||
IsChecked="{Binding Settings.IgnoreOrientation}"/>
|
||||
|
||||
<Border Margin="0,24,0,0"
|
||||
Background="{DynamicResource SecondaryBackgroundBrush}"
|
||||
Padding="12">
|
||||
@@ -134,18 +143,20 @@
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Style="{StaticResource DefaultButtonStyle}"
|
||||
FontSize="16"
|
||||
Margin="-10,0,0,0"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Input_ShowAdvanced}"
|
||||
ToolTip="{x:Static p:Resources.Input_ShowAdvanced}"
|
||||
Background="Transparent"
|
||||
Command="{Binding ShowAdvancedCommand}"
|
||||
/>
|
||||
Command="{Binding ShowAdvancedCommand}"/>
|
||||
<!-- Visibility="{Binding ShowAdvancedSettings, Converter={StaticResource BoolValueConverter}}" -->
|
||||
<Button Grid.Column="1"
|
||||
Style="{StaticResource AccentButtonStyle}"
|
||||
MinWidth="76"
|
||||
Command="{Binding ResizeCommand}"
|
||||
AutomationProperties.Name="{x:Static p:Resources.Resize_Tooltip}"
|
||||
Content="{x:Static p:Resources.Input_Resize}"
|
||||
IsDefault="True"/>
|
||||
|
||||
|
||||
<Button Grid.Column="2"
|
||||
Style="{StaticResource DefaultButtonStyle}"
|
||||
MinWidth="76"
|
||||
@@ -156,5 +167,4 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
ui:WindowHelper.UseModernWindowStyle="True"
|
||||
ui:TitleBar.IsIconVisible="True"
|
||||
ui:TitleBar.Background="{DynamicResource PrimaryBackgroundBrush}"
|
||||
AutomationProperties.Name="Image Resizer"
|
||||
>
|
||||
|
||||
<Window.Resources>
|
||||
|
||||
Reference in New Issue
Block a user