mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
[FZ editor] UX update for edit dialog (#9709)
* Layout title label fix
* Updated formatting for resolution textlabel
* Updated UX
* Added tooltip to layout title textblock
* Updated icon button styles
* Moved buttons around
* Updated margin
* Updated strings
* Revert "Updated strings"
This reverts commit cc4e1764b7.
* [spell checker] add terms
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
This commit is contained in:
@@ -112,14 +112,18 @@
|
|||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
FontSize="64"
|
FontSize="64"
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
||||||
<Label
|
<TextBlock FontSize="16"
|
||||||
Name="LabelSize"
|
Foreground="{DynamicResource SecondaryForegroundBrush}"
|
||||||
DockPanel.Dock="Bottom"
|
DockPanel.Dock="Bottom"
|
||||||
HorizontalContentAlignment="Center"
|
FontWeight="SemiBold"
|
||||||
VerticalContentAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
FontWeight="Thin"
|
VerticalAlignment="Center">
|
||||||
FontSize="32"
|
<Run x:Name="WidthLabel" />
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
<Run Text=""
|
||||||
|
FontSize="10"
|
||||||
|
FontFamily="Segoe MDL2 Assets" />
|
||||||
|
<Run x:Name="HeightLabel" />
|
||||||
|
</TextBlock>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
<Thumb x:Name="Caption" Cursor="SizeAll" Background="Transparent" BorderThickness="3" Padding="4" Grid.Column="0" Grid.ColumnSpan="5" Grid.Row="0" Grid.RowSpan="5" DragDelta="UniversalDragDelta" DragStarted="Caption_DragStarted" Style="{DynamicResource CanvasZoneThumbStyle}"/>
|
<Thumb x:Name="Caption" Cursor="SizeAll" Background="Transparent" BorderThickness="3" Padding="4" Grid.Column="0" Grid.ColumnSpan="5" Grid.Row="0" Grid.RowSpan="5" DragDelta="UniversalDragDelta" DragStarted="Caption_DragStarted" Style="{DynamicResource CanvasZoneThumbStyle}"/>
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ namespace FancyZonesEditor
|
|||||||
|
|
||||||
private void CanvasZone_SizeChanged(object sender, SizeChangedEventArgs e)
|
private void CanvasZone_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
{
|
{
|
||||||
LabelSize.Content = "(" + Width.ToString() + "x" + Height.ToString() + ")";
|
WidthLabel.Text = Width.ToString();
|
||||||
|
HeightLabel.Text = Height.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private CanvasLayoutModel model;
|
private CanvasLayoutModel model;
|
||||||
|
|||||||
@@ -26,14 +26,18 @@
|
|||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
FontSize="64"
|
FontSize="64"
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
||||||
<Label
|
<TextBlock FontSize="16"
|
||||||
Name="LabelSize"
|
Foreground="{DynamicResource SecondaryForegroundBrush}"
|
||||||
DockPanel.Dock="Bottom"
|
DockPanel.Dock="Bottom"
|
||||||
HorizontalContentAlignment="Center"
|
FontWeight="SemiBold"
|
||||||
VerticalContentAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
FontWeight="Thin"
|
VerticalAlignment="Center">
|
||||||
FontSize="32"
|
<Run x:Name="WidthLabel" />
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
<Run Text=""
|
||||||
|
FontSize="10"
|
||||||
|
FontFamily="Segoe MDL2 Assets" />
|
||||||
|
<Run x:Name="HeightLabel" />
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<!--<TextBlock Margin="2" Text="Shift Key switches direction Ctrl Key repeats"/>-->
|
<!--<TextBlock Margin="2" Text="Shift Key switches direction Ctrl Key repeats"/>-->
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ namespace FancyZonesEditor
|
|||||||
|
|
||||||
private void GridZone_SizeChanged(object sender, SizeChangedEventArgs e)
|
private void GridZone_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
{
|
{
|
||||||
LabelSize.Content = "(" + Math.Round(ActualWidth).ToString() + "x" + Math.Round(ActualHeight).ToString() + ")";
|
WidthLabel.Text = Math.Round(ActualWidth).ToString();
|
||||||
|
HeightLabel.Text = Math.Round(ActualHeight).ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ZoneSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
private void ZoneSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
|||||||
@@ -30,11 +30,12 @@
|
|||||||
<Converters:LayoutTypeCustomToVisibilityConverter x:Key="LayoutTypeCustomToVisibilityConverter" />
|
<Converters:LayoutTypeCustomToVisibilityConverter x:Key="LayoutTypeCustomToVisibilityConverter" />
|
||||||
<Converters:LayoutTypeTemplateToVisibilityConverter x:Key="LayoutTypeTemplateToVisibilityConverter" />
|
<Converters:LayoutTypeTemplateToVisibilityConverter x:Key="LayoutTypeTemplateToVisibilityConverter" />
|
||||||
<Converters:LayoutModelTypeBlankToVisibilityConverter x:Key="LayoutModelTypeBlankToVisibilityConverter" />
|
<Converters:LayoutModelTypeBlankToVisibilityConverter x:Key="LayoutModelTypeBlankToVisibilityConverter" />
|
||||||
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||||
|
|
||||||
<DropShadowEffect x:Key="CardShadow" BlurRadius="6"
|
<DropShadowEffect x:Key="CardShadow" BlurRadius="6"
|
||||||
Opacity="0.24"
|
Opacity="0.24"
|
||||||
ShadowDepth="1" />
|
ShadowDepth="1" />
|
||||||
|
|
||||||
<Style x:Key="CardStyle"
|
<Style x:Key="CardStyle"
|
||||||
TargetType="Border">
|
TargetType="Border">
|
||||||
<Setter Property="Background"
|
<Setter Property="Background"
|
||||||
@@ -62,44 +63,6 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="SpinnerButton" TargetType="Button">
|
|
||||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
|
||||||
<Setter Property="FontWeight" Value="SemiBold" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryForegroundBrush}"/>
|
|
||||||
<Setter Property="FontSize" Value="18"/>
|
|
||||||
<Setter Property="Padding" Value="0,0,0,5"/>
|
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
|
||||||
<Setter Property="Background" Value="{DynamicResource SecondaryBackgroundBrush}"/>
|
|
||||||
<Setter Property="Margin" Value="0,0,0,0" />
|
|
||||||
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="{x:Type Button}">
|
|
||||||
<Border Background="{TemplateBinding Background}" BorderBrush="{DynamicResource SecondaryBackgroundBrush}" BorderThickness="0">
|
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
|
|
||||||
<Style.Triggers>
|
|
||||||
<Trigger Property="Border.IsMouseOver" Value="True">
|
|
||||||
<Setter Property="Background"
|
|
||||||
Value="{DynamicResource LayoutItemBackgroundPointerOverBrush}" />
|
|
||||||
</Trigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="ZoneCount" TargetType="TextBlock">
|
|
||||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
|
||||||
<Setter Property="FontWeight" Value="Regular" />
|
|
||||||
<Setter Property="FontSize" Value="18"/>
|
|
||||||
<Setter Property="LineHeight" Value="24" />
|
|
||||||
<Setter Property="Margin" Value="20,0,20,0" />
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<DataTemplate x:Key="MonitorItemTemplate">
|
<DataTemplate x:Key="MonitorItemTemplate">
|
||||||
<Border x:Name="MonitorItem"
|
<Border x:Name="MonitorItem"
|
||||||
Width="{Binding DisplayWidth}"
|
Width="{Binding DisplayWidth}"
|
||||||
@@ -170,7 +133,8 @@
|
|||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Margin="0,-4,0,0"
|
Margin="0,-4,24,0"
|
||||||
|
ToolTip="{Binding Name}"
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
||||||
|
|
||||||
<Button Content=""
|
<Button Content=""
|
||||||
@@ -196,26 +160,8 @@
|
|||||||
|
|
||||||
<local:LayoutPreview Grid.Row="1"
|
<local:LayoutPreview Grid.Row="1"
|
||||||
Margin="0,8,0,8"
|
Margin="0,8,0,8"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
HorizontalAlignment="Stretch" />
|
HorizontalAlignment="Stretch" />
|
||||||
<Grid Grid.Row="2"
|
|
||||||
Visibility="Collapsed"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Margin="2,0,0,0">
|
|
||||||
<StackPanel Orientation="Vertical"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center">
|
|
||||||
<TextBlock ToolTip="{x:Static props:Resources.Space_Around_Zones}"
|
|
||||||
x:Name="SpacingTextBlock"
|
|
||||||
Foreground="{DynamicResource SecondaryForegroundBrush}">
|
|
||||||
<Run FontSize="10"
|
|
||||||
Text=""
|
|
||||||
FontFamily="Segoe MDL2 Assets" />
|
|
||||||
<Run Text=" " />
|
|
||||||
<Run Text="20" />
|
|
||||||
</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<Border x:Name="SelectionHighlight"
|
<Border x:Name="SelectionHighlight"
|
||||||
@@ -231,9 +177,6 @@
|
|||||||
<Setter TargetName="layoutName"
|
<Setter TargetName="layoutName"
|
||||||
Property="Foreground"
|
Property="Foreground"
|
||||||
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
||||||
<Setter TargetName="SpacingTextBlock"
|
|
||||||
Property="Foreground"
|
|
||||||
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
|
||||||
<Setter TargetName="SelectionHighlight"
|
<Setter TargetName="SelectionHighlight"
|
||||||
Property="Visibility"
|
Property="Visibility"
|
||||||
Value="Visible" />
|
Value="Visible" />
|
||||||
@@ -414,151 +357,129 @@
|
|||||||
Title="{x:Static props:Resources.Edit_Layout}"
|
Title="{x:Static props:Resources.Edit_Layout}"
|
||||||
Opened="Dialog_Opened"
|
Opened="Dialog_Opened"
|
||||||
Closed="Dialog_Closed">
|
Closed="Dialog_Closed">
|
||||||
<StackPanel Margin="0,16,0,0"
|
<Grid DataContext="{Binding SelectedModel}"
|
||||||
MinWidth="420"
|
MinWidth="320" Margin="0,0,0,32">
|
||||||
DataContext="{Binding SelectedModel}">
|
|
||||||
<Button Click="EditZones_Click"
|
|
||||||
x:Name="editZoneLayoutButton"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
AutomationProperties.Name="{x:Static props:Resources.Edit_zones}"
|
|
||||||
Height="48"
|
|
||||||
Margin="0,0,0,16"
|
|
||||||
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeCustomToVisibilityConverter}}"
|
|
||||||
Style="{StaticResource AccentButtonStyle}">
|
|
||||||
<Button.Content>
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text=""
|
|
||||||
Margin="0,2,8,0"
|
|
||||||
FontFamily="Segoe MDL2 Assets" />
|
|
||||||
<TextBlock Text="{x:Static props:Resources.Edit_zones}" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button.Content>
|
|
||||||
<Button.Effect>
|
|
||||||
<DropShadowEffect BlurRadius="6"
|
|
||||||
Opacity="0.32"
|
|
||||||
ShadowDepth="1" />
|
|
||||||
</Button.Effect>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Grid Margin="0,0,0,32"
|
<StackPanel Margin="0,-37,0,0"
|
||||||
Height="Auto"
|
HorizontalAlignment="Right"
|
||||||
HorizontalAlignment="Stretch">
|
VerticalAlignment="Top"
|
||||||
|
Orientation="Horizontal">
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Click="DuplicateLayout_Click"
|
<Button Click="DuplicateLayout_Click"
|
||||||
x:Name="duplicateLayoutButton"
|
x:Name="duplicateLayoutButton"
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
AutomationProperties.Name="{x:Static props:Resources.Duplicate}"
|
AutomationProperties.Name="{x:Static props:Resources.Duplicate}"
|
||||||
Height="48"
|
ToolTip="{x:Static props:Resources.Duplicate}"
|
||||||
Margin="0,0,4,0"
|
Content=""
|
||||||
Grid.Column="0"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeCustomToVisibilityConverter}}">
|
Style="{StaticResource IconOnlyButtonStyle}"
|
||||||
<Button.Content>
|
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeCustomToVisibilityConverter}}" />
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text=""
|
|
||||||
Margin="0,2,8,0"
|
|
||||||
FontFamily="Segoe MDL2 Assets" />
|
|
||||||
<TextBlock Text="{x:Static props:Resources.Duplicate}" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
<Button Click="DeleteLayout_Click"
|
|
||||||
x:Name="deleteLayoutButton"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
AutomationProperties.Name="{x:Static props:Resources.Delete}"
|
|
||||||
Height="48"
|
|
||||||
Margin="4,0,0,0"
|
|
||||||
Grid.Column="1"
|
|
||||||
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeCustomToVisibilityConverter}}">
|
|
||||||
<Button.Content>
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text=""
|
|
||||||
Margin="0,2,8,0"
|
|
||||||
FontFamily="Segoe MDL2 Assets" />
|
|
||||||
<TextBlock Text="{x:Static props:Resources.Delete}" />
|
|
||||||
</StackPanel>
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button Click="DuplicateLayout_Click"
|
<Button Click="DuplicateLayout_Click"
|
||||||
x:Name="createFromTemplateLayoutButton"
|
x:Name="createFromTemplateLayoutButton"
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
AutomationProperties.Name="{x:Static props:Resources.Create_Custom_From_Template}"
|
AutomationProperties.Name="{x:Static props:Resources.Create_Custom_From_Template}"
|
||||||
Height="48"
|
ToolTip="{x:Static props:Resources.Create_Custom_From_Template}"
|
||||||
Margin="0,0,4,0"
|
Content=""
|
||||||
Grid.Column="0"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeTemplateToVisibilityConverter}}">
|
Style="{StaticResource IconOnlyButtonStyle}"
|
||||||
|
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeTemplateToVisibilityConverter}}" />
|
||||||
|
|
||||||
|
<Button Click="DeleteLayout_Click"
|
||||||
|
x:Name="deleteLayoutButton"
|
||||||
|
AutomationProperties.Name="{x:Static props:Resources.Delete}"
|
||||||
|
ToolTip="{x:Static props:Resources.Delete}"
|
||||||
|
Content=""
|
||||||
|
FontFamily="Segoe MDL2 Assets"
|
||||||
|
Foreground="#c50500"
|
||||||
|
Style="{StaticResource IconOnlyButtonStyle}"
|
||||||
|
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeCustomToVisibilityConverter}}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<local:LayoutPreview Width="216"
|
||||||
|
Height="132"
|
||||||
|
Margin="0,16,0,16" />
|
||||||
|
<Button Click="EditZones_Click"
|
||||||
|
x:Name="editZoneLayoutButton"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
AutomationProperties.Name="{x:Static props:Resources.Edit_zones}"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
Foreground="{DynamicResource SystemControlBackgroundAccentBrush}"
|
||||||
|
Style="{StaticResource IconOnlyButtonStyle}"
|
||||||
|
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeCustomToVisibilityConverter}}">
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text=""
|
<TextBlock Text=""
|
||||||
Margin="0,2,8,0"
|
Margin="0,2,8,0"
|
||||||
FontFamily="Segoe MDL2 Assets" />
|
FontFamily="Segoe MDL2 Assets" />
|
||||||
<TextBlock Text="{x:Static props:Resources.Create_Custom_From_Template}" />
|
<TextBlock Text="{x:Static props:Resources.Edit_zones}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button.Content>
|
</Button.Content>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<TextBlock x:Name="nameHeader"
|
<StackPanel Orientation="Horizontal"
|
||||||
Text="{x:Static props:Resources.Name}"
|
HorizontalAlignment="Center"
|
||||||
IsEnabled="{Binding ShowSpacing}"
|
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeTemplateToVisibilityConverter}}">
|
||||||
Margin="0,0,0,0"
|
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
|
||||||
<TextBox Text="{Binding Name}"
|
|
||||||
Margin="0,6,0,0"
|
|
||||||
IsEnabled="{Binding IsCustom}"
|
|
||||||
AutomationProperties.LabeledBy="{Binding ElementName=nameHeader}" />
|
|
||||||
|
|
||||||
<TextBlock x:Name="numberOfZonesHeader"
|
<Button x:Name="decrementZones"
|
||||||
Text="{x:Static props:Resources.NumberOfZones}"
|
Width="40"
|
||||||
Margin="0,16,0,0"
|
Height="40"
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
AutomationProperties.Name="{x:Static props:Resources.Zone_Count_Decrement}"
|
||||||
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeTemplateToVisibilityConverter}}" />
|
ToolTip="{x:Static props:Resources.Zone_Count_Decrement}"
|
||||||
<StackPanel Margin="0,6,0,0"
|
Foreground="{DynamicResource SystemControlBackgroundAccentBrush}"
|
||||||
Orientation="Horizontal"
|
Style="{StaticResource IconOnlyButtonStyle}"
|
||||||
Visibility="{Binding Path=Type, Converter={StaticResource LayoutTypeTemplateToVisibilityConverter}}">
|
Click="DecrementZones_Click">
|
||||||
<Button x:Name="decrementZones"
|
<Button.Content>
|
||||||
Width="40"
|
<TextBlock Text=""
|
||||||
Height="40"
|
FontFamily="Segoe MDL2 Assets" />
|
||||||
AutomationProperties.Name="{x:Static props:Resources.Zone_Count_Decrement}"
|
</Button.Content>
|
||||||
Content="-"
|
</Button>
|
||||||
Style="{StaticResource SpinnerButton}"
|
|
||||||
Click="DecrementZones_Click"/>
|
<TextBlock x:Name="zoneCount"
|
||||||
<TextBlock x:Name="zoneCount" Text="{Binding TemplateZoneCount}" Style="{StaticResource ZoneCount}"/>
|
Text="{Binding TemplateZoneCount}"
|
||||||
<Button x:Name="incrementZones"
|
FontWeight="SemiBold"
|
||||||
Width="40"
|
FontSize="18"
|
||||||
Height="40"
|
Width="32"
|
||||||
AutomationProperties.Name="{x:Static props:Resources.Zone_Count_Increment}"
|
HorizontalAlignment="Center"
|
||||||
Content="+"
|
TextAlignment="Center"
|
||||||
Style="{StaticResource SpinnerButton}"
|
Margin="0,-4,0,0"
|
||||||
Click="IncrementZones_Click"/>
|
ToolTip="Number of zones"
|
||||||
</StackPanel>
|
VerticalAlignment="Center" />
|
||||||
|
|
||||||
<StackPanel Margin="0,16,0,0"
|
<Button x:Name="incrementZones"
|
||||||
Orientation="Vertical">
|
Width="40"
|
||||||
<ui:ToggleSwitch x:Name="spaceAroundSetting"
|
Height="40"
|
||||||
Header="{x:Static props:Resources.Show_Space_Zones}"
|
AutomationProperties.Name="{x:Static props:Resources.Zone_Count_Increment}"
|
||||||
IsOn="{Binding ShowSpacing}"
|
ToolTip="{x:Static props:Resources.Zone_Count_Increment}"
|
||||||
Visibility="{Binding Converter={StaticResource LayoutModelTypeToVisibilityConverter}}" />
|
Foreground="{DynamicResource SystemControlBackgroundAccentBrush}"
|
||||||
|
Style="{StaticResource IconOnlyButtonStyle}"
|
||||||
|
Click="IncrementZones_Click">
|
||||||
|
<Button.Content>
|
||||||
|
<TextBlock Text=""
|
||||||
|
FontFamily="Segoe MDL2 Assets" />
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBox Text="{Binding Name}"
|
||||||
|
ui:ControlHelper.Header="{x:Static props:Resources.Name}"
|
||||||
|
Margin="0,16,0,0"
|
||||||
|
Visibility="{Binding IsCustom, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
|
HorizontalAlignment="Stretch" />
|
||||||
|
|
||||||
|
<CheckBox x:Name="spaceAroundSetting"
|
||||||
|
Content="{x:Static props:Resources.Show_Space_Zones}"
|
||||||
|
IsChecked="{Binding ShowSpacing}"
|
||||||
|
Margin="0,16,0,0"
|
||||||
|
Visibility="{Binding Converter={StaticResource LayoutModelTypeToVisibilityConverter}}" />
|
||||||
|
|
||||||
<TextBlock x:Name="paddingValue"
|
<ui:NumberBox Margin="0,6,0,0"
|
||||||
Text="{x:Static props:Resources.Space_Around_Zones}"
|
IsEnabled="{Binding ShowSpacing}"
|
||||||
IsEnabled="{Binding ShowSpacing}"
|
Text="{Binding Spacing}"
|
||||||
Margin="0,8,0,0"
|
Width="106"
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
Minimum="-20"
|
||||||
Visibility="{Binding Converter={StaticResource LayoutModelTypeToVisibilityConverter}}" />
|
Maximum="1000"
|
||||||
|
SpinButtonPlacementMode="Compact"
|
||||||
<TextBox Margin="0,6,0,0"
|
HorizontalAlignment="Left"
|
||||||
IsEnabled="{Binding ShowSpacing}"
|
AutomationProperties.LabeledBy="{Binding ElementName=spaceAroundSetting}"
|
||||||
Text="{Binding Spacing}"
|
Visibility="{Binding Converter={StaticResource LayoutModelTypeToVisibilityConverter}}" />
|
||||||
Width="86"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
AutomationProperties.LabeledBy="{Binding ElementName=paddingValue}"
|
|
||||||
Visibility="{Binding Converter={StaticResource LayoutModelTypeToVisibilityConverter}}" />
|
|
||||||
|
|
||||||
<TextBlock Text="{x:Static props:Resources.Distance_adjacent_zones}"
|
<TextBlock Text="{x:Static props:Resources.Distance_adjacent_zones}"
|
||||||
IsEnabled="{Binding ShowSpacing}"
|
IsEnabled="{Binding ShowSpacing}"
|
||||||
@@ -566,13 +487,16 @@
|
|||||||
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
||||||
x:Name="sensitivityRadiusValue" />
|
x:Name="sensitivityRadiusValue" />
|
||||||
|
|
||||||
<TextBox Margin="0,6,0,0"
|
<ui:NumberBox Margin="0,6,0,0"
|
||||||
Text="{Binding SensitivityRadius}"
|
Text="{Binding SensitivityRadius}"
|
||||||
Width="86"
|
Width="106"
|
||||||
AutomationProperties.LabeledBy="{Binding ElementName=sensitivityRadiusValue}"
|
Minimum="0"
|
||||||
HorizontalAlignment="Left" />
|
Maximum="1000"
|
||||||
|
SpinButtonPlacementMode="Compact"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
AutomationProperties.LabeledBy="{Binding ElementName=sensitivityRadiusValue}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</ui:ContentDialog>
|
</ui:ContentDialog>
|
||||||
|
|
||||||
<ui:ContentDialog x:Name="NewLayoutDialog"
|
<ui:ContentDialog x:Name="NewLayoutDialog"
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ namespace FancyZonesEditor.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Edit zones.
|
/// Looks up a localized string similar to Edit zone layout.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Edit_zones {
|
public static string Edit_zones {
|
||||||
get {
|
get {
|
||||||
@@ -665,7 +665,7 @@ namespace FancyZonesEditor.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Decrement number of zones in template layout.
|
/// Looks up a localized string similar to Decrement number of zones.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Zone_Count_Decrement {
|
public static string Zone_Count_Decrement {
|
||||||
get {
|
get {
|
||||||
@@ -674,7 +674,7 @@ namespace FancyZonesEditor.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Increment number of zones in template layout.
|
/// Looks up a localized string similar to Increment number of zones.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Zone_Count_Increment {
|
public static string Zone_Count_Increment {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -176,10 +176,10 @@ To merge zones, select the zones and click "merge".</value>
|
|||||||
<value>Templates</value>
|
<value>Templates</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Zone_Count_Decrement" xml:space="preserve">
|
<data name="Zone_Count_Decrement" xml:space="preserve">
|
||||||
<value>Decrement number of zones in template layout</value>
|
<value>Decrement number of zones</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Zone_Count_Increment" xml:space="preserve">
|
<data name="Zone_Count_Increment" xml:space="preserve">
|
||||||
<value>Increment number of zones in template layout</value>
|
<value>Increment number of zones</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Error_Invalid_Arguments" xml:space="preserve">
|
<data name="Error_Invalid_Arguments" xml:space="preserve">
|
||||||
<value>FancyZones Editor arguments are invalid.</value>
|
<value>FancyZones Editor arguments are invalid.</value>
|
||||||
@@ -298,7 +298,7 @@ To merge zones, select the zones and click "merge".</value>
|
|||||||
<value>Are you sure you want to delete this layout?</value>
|
<value>Are you sure you want to delete this layout?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Edit_zones" xml:space="preserve">
|
<data name="Edit_zones" xml:space="preserve">
|
||||||
<value>Edit zones</value>
|
<value>Edit zone layout</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="No_Custom_Layouts_Message" xml:space="preserve">
|
<data name="No_Custom_Layouts_Message" xml:space="preserve">
|
||||||
<value>Create or duplicate a layout to get started</value>
|
<value>Create or duplicate a layout to get started</value>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||||
|
xmlns:primitives="clr-namespace:ModernWpf.Controls.Primitives"
|
||||||
xmlns:local="clr-namespace:FancyZonesEditor.Styles">
|
xmlns:local="clr-namespace:FancyZonesEditor.Styles">
|
||||||
|
|
||||||
<Style x:Key="LayoutTypeRadioButtonStyle" TargetType="RadioButton">
|
<Style x:Key="LayoutTypeRadioButtonStyle" TargetType="RadioButton">
|
||||||
@@ -90,4 +91,68 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="IconOnlyButtonStyle"
|
||||||
|
BasedOn="{StaticResource DefaultButtonStyle}"
|
||||||
|
TargetType="Button">
|
||||||
|
<Setter Property="Background"
|
||||||
|
Value="Transparent" />
|
||||||
|
<Setter Property="Foreground"
|
||||||
|
Value="{DynamicResource ButtonForeground}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border x:Name="Background"
|
||||||
|
Background="Transparent"
|
||||||
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
|
<Border x:Name="Border"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
||||||
|
<ContentPresenter x:Name="ContentPresenter"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
Focusable="False"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
|
</Border>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver"
|
||||||
|
Value="True">
|
||||||
|
<Setter TargetName="Background"
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ButtonBackgroundPointerOver}" />
|
||||||
|
<Setter TargetName="Border"
|
||||||
|
Property="BorderBrush"
|
||||||
|
Value="{DynamicResource ButtonBorderBrushPointerOver}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed"
|
||||||
|
Value="True">
|
||||||
|
<Setter TargetName="Background"
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ButtonBackgroundPressed}" />
|
||||||
|
<Setter TargetName="Border"
|
||||||
|
Property="BorderBrush"
|
||||||
|
Value="{DynamicResource ButtonBorderBrushPressed}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled"
|
||||||
|
Value="False">
|
||||||
|
<Setter TargetName="Background"
|
||||||
|
Property="Background"
|
||||||
|
Value="{DynamicResource ButtonBackgroundDisabled}" />
|
||||||
|
<Setter TargetName="Border"
|
||||||
|
Property="BorderBrush"
|
||||||
|
Value="{DynamicResource ButtonBorderBrushDisabled}" />
|
||||||
|
<Setter TargetName="ContentPresenter"
|
||||||
|
Property="TextElement.Foreground"
|
||||||
|
Value="{DynamicResource ButtonForegroundDisabled}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Reference in New Issue
Block a user