Changed numberbox to slider for FZ. Added opacity value textblock for all sliders

This commit is contained in:
Niels Laute
2020-05-29 15:11:52 +02:00
committed by Enrico Giordani
parent cee8253cd3
commit 751f30e316
3 changed files with 34 additions and 17 deletions

View File

@@ -276,7 +276,7 @@
<value>To exclude an application from snapping to zones add its name here (one per line). These apps will react only to Windows Snap.</value>
</data>
<data name="FancyZones_HighlightOpacity.Header" xml:space="preserve">
<value>Zone highlight opacity (%)</value>
<value>Zone highlight opacity</value>
</data>
<data name="FancyZones_HokeyEditorControl_Header.Header" xml:space="preserve">
<value>Edit hot key / shortcut</value>
@@ -426,7 +426,7 @@
<value>Enable Shortcut Guide</value>
</data>
<data name="ShortcutGuide_OverlayOpacity.Header" xml:space="preserve">
<value>Opacity of background (%)</value>
<value>Opacity of background</value>
</data>
<data name="ShortcutGuide_Theme.Header" xml:space="preserve">
<value>Choose Shortcut Guide overlay color</value>

View File

@@ -8,11 +8,13 @@
xmlns:viewModel="using:Microsoft.PowerToys.Settings.UI.ViewModels"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:CustomControls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<viewModel:FancyZonesViewModel x:Key="eventViewModel"/>
<converters:StringFormatConverter x:Key="StringFormatConverter"/>
</Page.Resources>
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
@@ -134,16 +136,21 @@
<TextBlock x:Uid="Appearance_GroupSettings"
Style="{StaticResource SettingsGroupTitleStyle}"/>
<muxc:NumberBox x:Uid="FancyZones_HighlightOpacity"
Value="{ Binding Mode=TwoWay, Path=HighlightOpacity}"
Minimum="0"
Maximum="100"
Width="240"
SpinButtonPlacementMode="Compact"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}" />
<StackPanel Orientation="Horizontal" Margin="{StaticResource SmallTopMargin}" Spacing="12">
<Slider x:Uid="FancyZones_HighlightOpacity"
Minimum="0"
Maximum="100"
Width="240"
IsThumbToolTipEnabled="False"
Value="{ Binding Mode=TwoWay, Path=HighlightOpacity}"
HorizontalAlignment="Left"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
<TextBlock Text="{ Binding Mode=OneWay, Path=HighlightOpacity, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}%' }"
VerticalAlignment="Center"
FontSize="16"
Margin="0,21,0,0"/>
</StackPanel>
<TextBlock x:Uid="FancyZones_ZoneHighlightColor"
Style="{StaticResource BodyTextBlockStyle}"
Margin="{StaticResource SmallTopMargin}" />

View File

@@ -5,10 +5,14 @@
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<converters:StringFormatConverter x:Key="StringFormatConverter"/>
</Page.Resources>
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="LayoutVisualStates">
@@ -58,19 +62,25 @@
SpinButtonPlacementMode="Compact"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopMargin}"
MinWidth="240"
Width="240"
Value="{ Binding Mode=TwoWay, Path=PressTime}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}" SmallChange="50" LargeChange="100"/>
<Slider x:Uid="ShortcutGuide_OverlayOpacity"
<StackPanel Orientation="Horizontal" Margin="{StaticResource MediumTopMargin}" Spacing="12">
<Slider x:Uid="ShortcutGuide_OverlayOpacity"
Minimum="0"
Maximum="100"
Width="240"
Value="{ Binding Mode=TwoWay, Path=OverlayOpacity}"
IsThumbToolTipEnabled="False"
HorizontalAlignment="Left"
Margin="{StaticResource MediumTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
<TextBlock Text="{ Binding Mode=OneWay, Path=OverlayOpacity, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}%' }"
VerticalAlignment="Center"
FontSize="16"
Margin="0,21,0,0"/>
</StackPanel>
<muxc:RadioButtons x:Uid="ShortcutGuide_Theme"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"