Replace radiobuttons with combobox

This commit is contained in:
Laute 2021-09-30 17:12:06 +02:00
parent 4a49eed913
commit 4e57795409
3 changed files with 47 additions and 16 deletions

View file

@ -1095,11 +1095,29 @@ Made with 💗 by Microsoft and the PowerToys community.</value>
<value>Small</value>
<comment>The size of the image</comment>
</data>
<data name="FancyZones_MoveWindowBasedOnRelativePosition.Content" xml:space="preserve">
<value>Win + Up/Down/Left/Right to move windows based on relative position</value>
<data name="FancyZones_MoveWindowBasedOnRelativePosition_Accesible.AutomationProperties.Name" xml:space="preserve">
<value>Windows key + Up, down, left or right arrow key to move windows based on relative position</value>
</data>
<data name="FancyZones_MoveWindowLeftRightBasedOnZoneIndex.Content" xml:space="preserve">
<value>Win + Left/Right to move windows based on zone index</value>
<data name="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Accesible.AutomationProperties.Name" xml:space="preserve">
<value>Windows key + Left or right arrow keys to move windows based on zone index</value>
</data>
<data name="FancyZones_MoveWindowBasedOnRelativePosition_Description.Text" xml:space="preserve">
<value>Windows key + &#xE010; &#xE011; &#xE012; or &#xE013;</value>
<comment>Do not loc the icons (hex numbers)</comment>
</data>
<data name="FancyZones_MoveWindowLeftRightBasedOnZoneIndex_Description.Text" xml:space="preserve">
<value>Windows key + &#xE00E; or &#xE00F;</value>
<comment>Do not loc the icons (hex numbers)</comment>
</data>
<data name="FancyZones_MoveWindowBasedOnRelativePosition.Text" xml:space="preserve">
<value>Based on relative position</value>
</data>
<data name="FancyZones_MoveWindow.Header" xml:space="preserve">
<value>Move windows</value>
</data>
<data name="FancyZones_MoveWindowLeftRightBasedOnZoneIndex.Text" xml:space="preserve">
<value>Based on zone index</value>
</data>
<data name="ColorPicker_Editor.Header" xml:space="preserve">
<value>Editor</value>

View file

@ -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_Accesible">
<StackPanel Orientation="Vertical">
<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_Accesible">
<StackPanel Orientation="Vertical">
<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"

View file

@ -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>