Skip to content

Commit 64f02c3

Browse files
committed
Redesign settings panel for sys plugin & Improve design styles
1 parent 8fa3491 commit 64f02c3

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public class JsonRPCPluginSettings
3030
private JsonStorage<ConcurrentDictionary<string, object>> _storage;
3131

3232
// maybe move to resource?
33+
private static Thickness settingPanelMargin1 = (Thickness)System.Windows.Application.Current.FindResource("SettingPanelMargin");
34+
3335
private static readonly Thickness settingControlMargin = new(0, 9, 18, 9);
3436
private static readonly Thickness settingCheckboxMargin = new(0, 9, 9, 9);
3537
private static readonly Thickness settingPanelMargin = new(0, 0, 0, 0);

Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
Visibility="{Binding ActionKeywordsVisibility}">
2121
<DockPanel Margin="{StaticResource SettingPanelMargin}">
2222
<TextBlock
23-
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
23+
Margin="{StaticResource SettingPanelItemRightMargin}"
2424
HorizontalAlignment="Left"
2525
VerticalAlignment="Center"
2626
DockPanel.Dock="Left"
2727
Style="{StaticResource Glyph}">
2828
&#xe819;
2929
</TextBlock>
3030
<TextBlock
31-
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
31+
Margin="{StaticResource SettingPanelItemRightMargin}"
3232
HorizontalAlignment="Left"
3333
VerticalAlignment="Center"
3434
DockPanel.Dock="Left"
3535
Style="{DynamicResource SettingTitleLabel}"
3636
Text="{DynamicResource actionKeywords}" />
3737
<Button
3838
Width="100"
39-
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
39+
Margin="{StaticResource SettingPanelItemLeftMargin}"
4040
HorizontalAlignment="Right"
4141
Command="{Binding SetActionKeywordsCommand}"
4242
Content="{Binding ActionKeywordsText}"

Flow.Launcher/Resources/CustomControlTemplate.xaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5587,8 +5587,13 @@
55875587
</Style>
55885588

55895589
<!-- Settings Panel -->
5590-
<Thickness x:Key="SettingPanelMargin">70,0,18,0</Thickness>
5590+
<Thickness x:Key="SettingPanelMargin">70,9,18,9</Thickness>
5591+
<Thickness x:Key="SettingPanelItemLeftMargin">9,0,0,0</Thickness>
5592+
<Thickness x:Key="SettingPanelItemRightMargin">0,0,9,0</Thickness>
5593+
<Thickness x:Key="SettingPanelItemTopBottomMargin">0,9,0,9</Thickness>
5594+
55915595
<Thickness x:Key="SettingPanelItemLeftTopBottomMargin">9,9,0,9</Thickness>
55925596
<Thickness x:Key="SettingPanelItemRightTopBottomMargin">0,9,9,9</Thickness>
5593-
<Thickness x:Key="SettingPanelItemLeftRightTopBottomMargin">9,9,9,9</Thickness>
5597+
<Thickness x:Key="SettingPanelItemLeftBottomMargin">9,0,0,9</Thickness>
5598+
<Thickness x:Key="SettingPanelItemRightBottomMargin">0,0,9,9</Thickness>
55945599
</ResourceDictionary>

Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@
5454
<TextBlock
5555
Grid.Row="1"
5656
Grid.Column="0"
57-
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
57+
Margin="{StaticResource SettingPanelItemRightBottomMargin}"
5858
VerticalAlignment="Center"
5959
FontSize="14"
6060
Text="{DynamicResource flowlauncher_plugin_calculator_max_decimal_places}" />
6161
<ComboBox
6262
x:Name="MaxDecimalPlaces"
6363
Grid.Row="1"
6464
Grid.Column="1"
65-
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
65+
Margin="{StaticResource SettingPanelItemRightBottomMargin}"
6666
HorizontalAlignment="Left"
6767
VerticalAlignment="Center"
6868
ItemsSource="{Binding MaxDecimalPlacesRange}"

Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
d:DesignHeight="300"
88
d:DesignWidth="300"
99
mc:Ignorable="d">
10-
<Grid Margin="70,18,18,18">
10+
<Grid Margin="{StaticResource SettingPanelMargin}">
1111
<ListView
1212
x:Name="lbxCommands"
1313
Grid.Row="0"
14-
Margin="0"
14+
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
1515
BorderBrush="DarkGray"
1616
BorderThickness="1"
1717
SizeChanged="ListView_SizeChanged"

0 commit comments

Comments
 (0)