mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 21:41:51 +02:00
[Settings] A11y fixes (2) (#13534)
* Replace radiobuttons with combobox * Update Resources.resw * Replaced radiobuttons with ComboBox * Update ColorPickerPage.xaml * Updates * Typo fixes * PR feedback Co-authored-by: Laute <Niels.Laute@philips.com>
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:c="using:Microsoft.PowerToys.Settings.UI.Converters"
|
||||
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters"
|
||||
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
mc:Ignorable="d"
|
||||
AutomationProperties.LandmarkType="Main">
|
||||
|
||||
<Page.Resources>
|
||||
<c:AwakeModeToBoolConverter x:Key="AwakeModeToBoolConverter" />
|
||||
<converters:AwakeModeToIntConverter x:Key="AwakeModeToIntConverter" />
|
||||
</Page.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Uid="Awake" IsTabStop="False"
|
||||
@@ -29,86 +29,50 @@
|
||||
</controls:Setting>
|
||||
|
||||
<controls:SettingsGroup x:Uid="Awake_Behavior_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||
|
||||
<controls:Setting x:Uid="Awake_Mode" Icon="" >
|
||||
<controls:Setting.ActionContent>
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SelectedIndex="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToIntConverter}}">
|
||||
<ComboBoxItem x:Uid="Awake_NoKeepAwake"/>
|
||||
<ComboBoxItem x:Uid="Awake_IndefiniteKeepAwake"/>
|
||||
<ComboBoxItem x:Uid="Awake_TemporaryKeepAwake"/>
|
||||
</ComboBox>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:Setting x:Uid="Awake_TimeBeforeAwake" Icon="" Visibility="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}">
|
||||
<controls:Setting.ActionContent>
|
||||
<StackPanel
|
||||
Orientation="Horizontal">
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Hours"
|
||||
Value="{x:Bind ViewModel.Hours, Mode=TwoWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
Width="96"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Minutes"
|
||||
Value="{x:Bind ViewModel.Minutes, Mode=TwoWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Margin="8,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Width="96"
|
||||
Maximum="60"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
</StackPanel>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:Setting x:Uid="Awake_EnableDisplayKeepAwake" Icon="">
|
||||
<controls:Setting.ActionContent>
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.KeepDisplayOn, Mode=TwoWay}" />
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="Awake_Mode"
|
||||
Icon=""
|
||||
Style="{StaticResource ExpanderHeaderSettingStyle}" />
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel Padding="56,16,16,24"
|
||||
Spacing="12">
|
||||
<RadioButton x:Uid="Awake_NoKeepAwake"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=0}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords"
|
||||
LineHeight="20">
|
||||
<Run x:Uid="Awake_NoKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
x:Uid="Awake_NoKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Awake_IndefiniteKeepAwake"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=1}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords"
|
||||
LineHeight="20">
|
||||
<Run x:Uid="Awake_IndefiniteKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
x:Uid="Awake_IndefiniteKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<RadioButton x:Uid="Awake_TemporaryKeepAwake"
|
||||
IsChecked="{x:Bind Path=ViewModel.Mode, Mode=TwoWay, Converter={StaticResource AwakeModeToBoolConverter}, ConverterParameter=2}">
|
||||
<RadioButton.Content>
|
||||
<TextBlock TextWrapping="WrapWholeWords"
|
||||
LineHeight="20">
|
||||
<Run x:Uid="Awake_TemporaryKeepAwakeContent"/>
|
||||
<LineBreak/>
|
||||
<Run Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
x:Uid="Awake_TemporaryKeepAwakeDescription"/>
|
||||
</TextBlock>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
<StackPanel AutomationProperties.LabeledBy="{Binding ElementName=ModeTitleLabel}"
|
||||
Margin="0,-8,0,0">
|
||||
|
||||
<StackPanel Margin="28,8,0,0"
|
||||
Orientation="Horizontal">
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Hours"
|
||||
Value="{x:Bind ViewModel.Hours, Mode=TwoWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
MinWidth="90"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
<muxc:NumberBox x:Uid="Awake_TemporaryKeepAwake_Minutes"
|
||||
Value="{x:Bind ViewModel.Minutes, Mode=TwoWay}"
|
||||
IsEnabled="{x:Bind ViewModel.IsTimeConfigurationEnabled, Mode=OneWay}"
|
||||
Minimum="0"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Margin="8,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
MinWidth="90"
|
||||
SmallChange="1"
|
||||
LargeChange="5"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
</controls:SettingsGroup>
|
||||
</StackPanel>
|
||||
</controls:SettingsPageControl.ModuleContent>
|
||||
|
||||
@@ -34,50 +34,16 @@
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:SettingExpander IsExpanded="True" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="ColorPicker_ActivationAction" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}" />
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel Padding="56,16,16,24" Spacing="12">
|
||||
<RadioButton x:Uid="ColorPickerFirst_Accessible" IsChecked="{Binding ActivationOpensColorPickerAndEditor, Mode=TwoWay}" GroupName="ColorPickerActivationAction">
|
||||
<RadioButton.Content>
|
||||
<StackPanel>
|
||||
<TextBlock x:Uid="ColorPickerFirst"/>
|
||||
<controls:TextBlockControl x:Uid="ColorPickerFirst_Description"
|
||||
FontSize="{StaticResource SecondaryTextFontSize}"
|
||||
EnabledForeground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
DisabledForeground="{ThemeResource TextFillColorDisabledBrush}"/>
|
||||
</StackPanel>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
|
||||
<RadioButton x:Uid="EditorFirst_Accessible" IsChecked="{Binding ActivationOpensEditor, Mode=TwoWay}" GroupName="ColorPickerActivationAction">
|
||||
<RadioButton.Content>
|
||||
<StackPanel>
|
||||
<TextBlock x:Uid="EditorFirst"/>
|
||||
<controls:TextBlockControl x:Uid="EditorFirst_Description"
|
||||
FontSize="{StaticResource SecondaryTextFontSize}"
|
||||
EnabledForeground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
DisabledForeground="{ThemeResource TextFillColorDisabledBrush}"/>
|
||||
</StackPanel>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
|
||||
<RadioButton x:Uid="ColorPickerOnly_Accessible" IsChecked="{Binding ActivationOpensColorPickerOnly, Mode=TwoWay}" GroupName="ColorPickerActivationAction">
|
||||
<RadioButton.Content>
|
||||
<StackPanel>
|
||||
<TextBlock x:Uid="ColorPickerOnly"/>
|
||||
<controls:TextBlockControl x:Uid="ColorPickerOnly_Description"
|
||||
FontSize="{StaticResource SecondaryTextFontSize}"
|
||||
EnabledForeground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
DisabledForeground="{ThemeResource TextFillColorDisabledBrush}"/>
|
||||
</StackPanel>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
<controls:Setting x:Uid="ColorPicker_ActivationAction" Icon="" >
|
||||
<controls:Setting.ActionContent>
|
||||
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SelectedIndex="{x:Bind Path=ViewModel.ActivationBehavior, Mode=TwoWay}" >
|
||||
<ComboBoxItem x:Uid="EditorFirst"/>
|
||||
<ComboBoxItem x:Uid="ColorPickerFirst"/>
|
||||
<ComboBoxItem x:Uid="ColorPickerOnly"/>
|
||||
</ComboBox>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup x:Uid="ColorFormats" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
AutomationProperties.LandmarkType="Main">
|
||||
|
||||
<Page.Resources>
|
||||
<converters:BoolToObjectConverter x:Key="BoolToComboBoxIndexConverter" TrueValue="1" FalseValue="0"/>
|
||||
<converters:StringFormatConverter x:Key="StringFormatConverter"/>
|
||||
</Page.Resources>
|
||||
|
||||
@@ -226,16 +227,29 @@
|
||||
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel>
|
||||
<RadioButton x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsBasedOnZoneIndex}"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}"
|
||||
GroupName="OverrideSnapGroup"
|
||||
Margin="{StaticResource ExpanderSettingMargin}"/>
|
||||
<RadioButton x:Uid="FancyZones_MoveWindowBasedOnRelativePosition"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsBasedOnPosition}"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}"
|
||||
GroupName="OverrideSnapGroup"
|
||||
Margin="{StaticResource ExpanderSettingMargin}"/>
|
||||
<controls:Setting x:Uid="FancyZones_MoveWindow" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SnapHotkeysCategoryEnabled}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<ComboBox SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MoveWindowsBasedOnPosition, Converter={StaticResource BoolToComboBoxIndexConverter}}" MinHeight="56" MinWidth="{StaticResource SettingActionControlMinWidth}">
|
||||
<ComboBoxItem x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Accessible">
|
||||
<StackPanel Orientation="Vertical" Spacing="4">
|
||||
<TextBlock x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex"/>
|
||||
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
|
||||
<Run x:Uid="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Description" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ComboBoxItem>
|
||||
<ComboBoxItem x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Accessible">
|
||||
<StackPanel Orientation="Vertical" Spacing="4">
|
||||
<TextBlock x:Uid="FancyZones_MoveWindowBasedOnRelativePosition"/>
|
||||
<TextBlock FontFamily="{ThemeResource SymbolThemeFontFamily}" Style="{StaticResource SecondaryTextStyle}">
|
||||
<Run x:Uid="FancyZones_MoveWindowBasedOnRelativePosition_Description" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ComboBoxItem>
|
||||
</ComboBox>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
<CheckBox x:Uid="FancyZones_MoveWindowsAcrossAllMonitorsCheckBoxControl"
|
||||
Margin="56,8,16,8"
|
||||
|
||||
@@ -179,12 +179,11 @@
|
||||
|
||||
<controls:Setting x:Uid="ImageResizer_Encoding">
|
||||
<controls:Setting.ActionContent>
|
||||
<muxc:NumberBox
|
||||
<Slider
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.JPEGQualityLevel}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Right"
|
||||
/>
|
||||
</controls:Setting.ActionContent>
|
||||
|
||||
Reference in New Issue
Block a user