Skip to content

Commit 2a093ff

Browse files
committed
- Change Toggle Switch Flow (LTR from RTL)
- Change Open Theme Folder Button Width to Responsive
1 parent f6d8d3e commit 2a093ff

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

Flow.Launcher/Resources/CustomControlTemplate.xaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,15 +1478,15 @@
14781478
<ui:SimpleVisualStateManager />
14791479
</VisualStateManager.CustomVisualStateManager>
14801480

1481-
<Grid>
1481+
<Grid HorizontalAlignment="Right">
14821482
<Grid.RowDefinitions>
14831483
<RowDefinition Height="Auto" />
14841484
<RowDefinition Height="*" />
14851485
</Grid.RowDefinitions>
14861486

14871487
<ui:ContentPresenterEx
14881488
x:Name="HeaderContentPresenter"
1489-
Grid.Row="1"
1489+
Grid.Row="0"
14901490
Margin="{DynamicResource ToggleSwitchTopHeaderMargin}"
14911491
VerticalAlignment="Top"
14921492
Content="{TemplateBinding Header}"
@@ -1497,11 +1497,9 @@
14971497
TextWrapping="Wrap"
14981498
Visibility="Collapsed" />
14991499
<Grid
1500-
Grid.Row="0"
1501-
Width="100"
1500+
Grid.Row="1"
15021501
MinWidth="{DynamicResource ToggleSwitchThemeMinWidth}"
1503-
Margin="10,0,0,0"
1504-
HorizontalAlignment="Left"
1502+
HorizontalAlignment="Right"
15051503
VerticalAlignment="Top">
15061504

15071505
<Grid.RowDefinitions>
@@ -1511,7 +1509,7 @@
15111509
</Grid.RowDefinitions>
15121510

15131511
<Grid.ColumnDefinitions>
1514-
<ColumnDefinition Width="Auto" />
1512+
<ColumnDefinition Width="*" />
15151513
<ColumnDefinition Width="12" MaxWidth="12" />
15161514
<ColumnDefinition Width="Auto" />
15171515
</Grid.ColumnDefinitions>
@@ -1520,6 +1518,7 @@
15201518
Grid.RowSpan="3"
15211519
Grid.ColumnSpan="3"
15221520
Margin="0,5"
1521+
HorizontalAlignment="Right"
15231522
ui:FocusVisualHelper.IsTemplateFocusTarget="True"
15241523
Background="{DynamicResource ToggleSwitchContainerBackground}" />
15251524
<ContentPresenter
@@ -1552,6 +1551,7 @@
15521551
Grid.Column="2"
15531552
Width="40"
15541553
Height="20"
1554+
HorizontalAlignment="Right"
15551555
Fill="{DynamicResource ToggleSwitchFillOff}"
15561556
RadiusX="10"
15571557
RadiusY="10"
@@ -1563,6 +1563,7 @@
15631563
Grid.Column="2"
15641564
Width="40"
15651565
Height="20"
1566+
HorizontalAlignment="Right"
15661567
Fill="{DynamicResource ToggleSwitchFillOn}"
15671568
Opacity="0"
15681569
RadiusX="10"

Flow.Launcher/SettingWindow.xaml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@
5757
MinWidth="20"
5858
MaxWidth="60" />
5959
<ColumnDefinition Width="8*" />
60-
<ColumnDefinition
61-
Width="Auto"
62-
MinWidth="40"
63-
MaxWidth="550" />
60+
<ColumnDefinition Width="Auto" MinWidth="30" />
6461
</Grid.ColumnDefinitions>
6562
</Grid>
6663
</ItemsPanelTemplate>
@@ -102,19 +99,24 @@
10299
TargetType="{x:Type CheckBox}">
103100
<Setter Property="Width" Value="24" />
104101
<Setter Property="Grid.Column" Value="2" />
105-
<Setter Property="Margin" Value="0,4,0,4" />
102+
<Setter Property="Margin" Value="0,4,10,4" />
106103
<Setter Property="LayoutTransform">
107104
<Setter.Value>
108105
<ScaleTransform ScaleX="1" ScaleY="1" />
109106
</Setter.Value>
110107
</Setter>
111108
</Style>
112109

113-
<Style x:Key="SideToggleSwitch" TargetType="{x:Type ui:ToggleSwitch}">
110+
<Style
111+
x:Key="SideToggleSwitch"
112+
BasedOn="{StaticResource DefaultToggleSwitch}"
113+
TargetType="{x:Type ui:ToggleSwitch}">
114114
<Setter Property="Grid.Column" Value="2" />
115+
<Setter Property="Width" Value="Auto" />
116+
<Setter Property="HorizontalAlignment" Value="Right" />
117+
<Setter Property="HorizontalContentAlignment" Value="Right" />
115118
<Setter Property="OffContent" Value="{DynamicResource disable}" />
116119
<Setter Property="OnContent" Value="{DynamicResource enable}" />
117-
<Setter Property="FlowDirection" Value="RightToLeft" />
118120
<Setter Property="Margin" Value="0,4,22,4" />
119121
</Style>
120122

@@ -948,9 +950,9 @@
948950
FlowDirection="LeftToRight">
949951
<Grid.ColumnDefinitions>
950952
<ColumnDefinition Width="100" MinWidth="100" />
951-
<ColumnDefinition Width="3*" />
952-
<ColumnDefinition />
953-
<ColumnDefinition />
953+
<ColumnDefinition Width="8*" />
954+
<ColumnDefinition MinWidth="100" />
955+
<ColumnDefinition Width="Auto" />
954956
</Grid.ColumnDefinitions>
955957
<StackPanel
956958
Grid.Column="0"
@@ -990,7 +992,7 @@
990992
<Border>
991993
<Button
992994
x:Name="PriorityButton"
993-
Margin="0,0,12,0"
995+
Margin="0,0,0,0"
994996
VerticalAlignment="Center"
995997
Click="OnPluginPriorityClick"
996998
Content="{Binding Priority, UpdateSourceTrigger=PropertyChanged}"
@@ -1021,11 +1023,7 @@
10211023
</Border>
10221024
</StackPanel>
10231025
<DockPanel Grid.Column="3">
1024-
<ui:ToggleSwitch
1025-
Margin="0"
1026-
DockPanel.Dock="Right"
1027-
IsOn="{Binding PluginState}"
1028-
Style="{DynamicResource SideToggleSwitch}" />
1026+
<ui:ToggleSwitch HorizontalAlignment="Right" IsOn="{Binding PluginState}" />
10291027
</DockPanel>
10301028
</Grid>
10311029

@@ -1955,7 +1953,7 @@
19551953
</StackPanel>
19561954
<Button
19571955
Grid.Column="2"
1958-
Width="180"
1956+
MinWidth="180"
19591957
Margin="0,0,18,0"
19601958
HorizontalAlignment="Center"
19611959
Click="OpenThemeFolder"

0 commit comments

Comments
 (0)