Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Settings Panel Design #3265

Open
wants to merge 36 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9880c36
Remove useless settings control & project reference
Jack251970 Feb 19, 2025
6e84326
Reassign margins
Jack251970 Feb 19, 2025
6de0ab8
Merge branch 'Flow-Launcher:dev' into settings_panel
Jack251970 Feb 21, 2025
2ff1388
Merge branch 'dev' into settings_panel
Jack251970 Feb 24, 2025
cc2ba99
Improve action keyword panel
Jack251970 Feb 26, 2025
51e62d2
Improve action keyword panel
Jack251970 Feb 26, 2025
8fa3491
Redesgin settings panel for calculator plugin
Jack251970 Feb 26, 2025
64f02c3
Redesign settings panel for sys plugin & Improve design styles
Jack251970 Feb 27, 2025
9e43774
Improve design for inner settings panel
Jack251970 Feb 27, 2025
65fb98f
Redesgin settings panel for shell plugin
Jack251970 Feb 27, 2025
6d4919f
Redesgin settings panel for plugins manager plugin
Jack251970 Feb 27, 2025
ac956bc
Redesgin settings panel for program plugin
Jack251970 Feb 27, 2025
16b45d3
Redesgin settings panel for bookmark plugin
Jack251970 Feb 27, 2025
975d6ee
Redesgin settings panel for websearch plugin
Jack251970 Feb 27, 2025
330a11a
Adjust margin & Make title vertically center in program plugin
Jack251970 Feb 28, 2025
e0fe8e1
Change seperator style
Jack251970 Feb 28, 2025
51a9999
Improve code quality & Add seperator type
Jack251970 Feb 28, 2025
4f46a8c
Merge branch 'dev' into settings_panel
Jack251970 Mar 1, 2025
f283105
Enable nullable & Improve code quality
Jack251970 Mar 1, 2025
196a840
Use auto height row & auto width column
Jack251970 Mar 1, 2025
4304329
Improve code quality
Jack251970 Mar 1, 2025
f99648f
Redesgin json rpc settings
Jack251970 Mar 1, 2025
e893645
Improve JsonRPC settings panel design
Jack251970 Mar 1, 2025
e1c4461
Fix JsonElement parse issue
Jack251970 Mar 1, 2025
62677bc
Fix program plugin settings panel top bottom margin issue
Jack251970 Mar 1, 2025
317258a
Redesgin settings panel for explorer plugin
Jack251970 Mar 1, 2025
cd320f3
Move to resource
Jack251970 Mar 1, 2025
86c0553
Unify operation button width
Jack251970 Mar 1, 2025
9f55e83
Change file select string
Jack251970 Mar 1, 2025
bc7f4fe
Improve text area
Jack251970 Mar 1, 2025
af3a1a3
Unify text area min width & height
Jack251970 Mar 1, 2025
ae8f647
Use styles for JsonRPC settings panel
Jack251970 Mar 2, 2025
1681ac4
Fix path select button possibly invisible issue
Jack251970 Mar 2, 2025
31892a0
Adjust installed plugin keyword margin
Jack251970 Mar 2, 2025
38cf8c3
Merge branch 'dev' into settings_panel
Jack251970 Mar 2, 2025
20d0ed1
Remove unnecessary todo
Jack251970 Mar 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
613 changes: 336 additions & 277 deletions Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,33 @@
mc:Ignorable="d">
<Border
Width="Auto"
Height="52"
Height="Auto"
Margin="0"
Padding="0"
BorderThickness="0 1 0 0"
CornerRadius="0"
Style="{DynamicResource SettingGroupBox}"
Visibility="{Binding ActionKeywordsVisibility}">
<DockPanel Margin="22 0 18 0" VerticalAlignment="Center">
<DockPanel Margin="{StaticResource SettingPanelMargin}">
<TextBlock
Margin="48 0 10 0"
Margin="{StaticResource SettingPanelItemRightMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
DockPanel.Dock="Left"
Style="{StaticResource Glyph}">
&#xe819;
</TextBlock>
<TextBlock
Margin="{StaticResource SettingPanelItemRightMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
DockPanel.Dock="Left"
Style="{DynamicResource SettingTitleLabel}"
Text="{DynamicResource actionKeywords}" />
<!-- Here Margin="0 -4.5 0 -4.5" is to remove redundant top bottom margin from Margin="{StaticResource SettingPanelMargin}" -->
<Button
Width="100"
Height="34"
Margin="5 0 0 0"
Margin="0 -4.5 0 -4.5"
HorizontalAlignment="Right"
Command="{Binding SetActionKeywordsCommand}"
Content="{Binding ActionKeywordsText}"
Expand Down
28 changes: 28 additions & 0 deletions Flow.Launcher/Resources/CustomControlTemplate.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5585,4 +5585,32 @@
</Setter.Value>
</Setter>
</Style>

<!-- Settings Panel -->
<Thickness x:Key="SettingPanelMargin">70,13.5,18,13.5</Thickness>

<Thickness x:Key="SettingPanelItemLeftMargin">9,0,0,0</Thickness>
<Thickness x:Key="SettingPanelItemRightMargin">0,0,9,0</Thickness>
<Thickness x:Key="SettingPanelItemTopBottomMargin">0,4.5,0,4.5</Thickness>

<Thickness x:Key="SettingPanelItemLeftTopBottomMargin">9,4.5,0,4.5</Thickness>
<Thickness x:Key="SettingPanelItemRightTopBottomMargin">0,4.5,9,4.5</Thickness>

<Style x:Key="SettingPanelSeperatorStyle" TargetType="Separator">
<Setter Property="Margin" Value="-70 13.5 -18 13.5" />
<Setter Property="Height" Value="1" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Background" Value="{DynamicResource Color03B}" />
</Style>

<system:Double x:Key="SettingPanelTextBoxMinWidth">180</system:Double>
<system:Double x:Key="SettingPanelPathTextBoxWidth">240</system:Double>
<system:Double x:Key="SettingPanelAreaTextBoxMinWidth">270</system:Double>
<system:Double x:Key="SettingPanelAreaTextBoxMinHeight">150</system:Double>

<Style x:Key="SettingPanelTextBlockDescriptionStyle" TargetType="TextBlock">
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="0 2 0 0" />
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
</Style>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -8,77 +8,87 @@
d:DesignWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
mc:Ignorable="d">
<Grid Margin="60,0,10,0">
<Grid Margin="{StaticResource SettingPanelMargin}">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Margin="0,10,0,10" Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Margin="10" Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" />
<CheckBox
Margin="0,0,15,0"
Content="Chrome"
IsChecked="{Binding LoadChromeBookmark}" />
<CheckBox
Margin="0,0,15,0"
Content="Edge"
IsChecked="{Binding LoadEdgeBookmark}" />
<CheckBox
Margin="0,0,15,0"
Content="Firefox"
IsChecked="{Binding LoadFirefoxBookmark}" />
<StackPanel
Grid.Row="0"
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
Orientation="Horizontal">
<TextBlock
Margin="{StaticResource SettingPanelItemRightMargin}"
VerticalAlignment="Center"
Text="{DynamicResource flowlauncher_plugin_browserbookmark_loadBrowserFrom}" />
<CheckBox
Margin="{StaticResource SettingPanelItemRightMargin}"
Content="Chrome"
IsChecked="{Binding LoadChromeBookmark}" />
<CheckBox
Margin="{StaticResource SettingPanelItemRightMargin}"
Content="Edge"
IsChecked="{Binding LoadEdgeBookmark}" />
<CheckBox
Margin="{StaticResource SettingPanelItemRightMargin}"
Content="Firefox"
IsChecked="{Binding LoadFirefoxBookmark}" />
<Button
Margin="{StaticResource SettingPanelItemRightMargin}"
Click="Others_Click"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_others}" />
</StackPanel>
<StackPanel
Name="CustomBrowsersList"
Grid.Row="1"
Visibility="Collapsed">
<ListView
Name="CustomBrowsers"
Height="auto"
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
BorderBrush="DarkGray"
BorderThickness="1"
ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser"
SelectedItem="{Binding SelectedCustomBrowser}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
<GridViewColumn DisplayMemberBinding="{Binding BrowserType, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserEngine}" />
</GridView>
</ListView.View>
</ListView>
<StackPanel
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Margin="0,0,15,0"
Click="Others_Click"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_others}" />
</StackPanel>
<StackPanel Name="CustomBrowsersList" Visibility="Collapsed">
<ListView
Name="CustomBrowsers"
Height="auto"
Margin="10"
BorderBrush="DarkGray"
BorderThickness="1"
ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser"
SelectedItem="{Binding SelectedCustomBrowser}"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserName}" />
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserBookmarkDataDirectory}" />
<GridViewColumn DisplayMemberBinding="{Binding BrowserType, Mode=OneWay}" Header="{DynamicResource flowlauncher_plugin_browserbookmark_browserEngine}" />
</GridView>
</ListView.View>
</ListView>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
MinWidth="130"
Margin="10"
Click="NewCustomBrowser"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" />
<Button
MinWidth="130"
Margin="10"
Click="EditCustomBrowser"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_editBrowserBookmark}">
<Button.Style>
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button">
<Setter Property="IsEnabled" Value="true" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=CustomBrowsers, Path=SelectedItems.Count}" Value="0">
<Setter Property="IsEnabled" Value="false" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button
MinWidth="120"
Margin="10"
Click="DeleteCustomBrowser"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" />
</StackPanel>
Width="100"
Click="NewCustomBrowser"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_addBrowserBookmark}" />
<Button
Width="100"
Margin="{StaticResource SettingPanelItemLeftMargin}"
Click="EditCustomBrowser"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_editBrowserBookmark}">
<Button.Style>
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button">
<Setter Property="IsEnabled" Value="true" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=CustomBrowsers, Path=SelectedItems.Count}" Value="0">
<Setter Property="IsEnabled" Value="false" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button
Width="100"
Margin="{StaticResource SettingPanelItemLeftMargin}"
Click="DeleteCustomBrowser"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_removeBrowserBookmark}" />
</StackPanel>
</StackPanel>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<core:LocalizationConverter x:Key="LocalizationConverter" />
</UserControl.Resources>

<Grid Margin="70,14,0,14">
<Grid Margin="{StaticResource SettingPanelMargin}">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
Expand All @@ -30,7 +30,7 @@
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="0,0,10,0"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_calculator_output_decimal_seperator}" />
Expand All @@ -39,8 +39,9 @@
Grid.Row="0"
Grid.Column="1"
MaxWidth="300"
Margin="10,5,0,5"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding Source={ui:EnumBindingSource {x:Type calculator:DecimalSeparator}}}"
SelectedItem="{Binding Settings.DecimalSeparator}">
<ComboBox.ItemTemplate>
Expand All @@ -53,16 +54,17 @@
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="0,0,10,0"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_calculator_max_decimal_places}" />
<ComboBox
x:Name="MaxDecimalPlaces"
Grid.Row="1"
Grid.Column="1"
Margin="10,5,0,5"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding MaxDecimalPlacesRange}"
SelectedItem="{Binding Settings.MaxDecimalPlaces}" />

Expand Down
Loading
Loading