Skip to content

Commit 96d7d18

Browse files
committed
Change string resource names & Redesign setting panel
1 parent 4f49077 commit 96d7d18

File tree

2 files changed

+81
-52
lines changed

2 files changed

+81
-52
lines changed

Plugins/Flow.Launcher.Plugin.Url/Languages/en.xaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
<system:String x:Key="flowlauncher_plugin_url_plugin_choose">Choose</system:String>
1313
<system:String x:Key="flowlauncher_plugin_url_plugin_filter">Application(*.exe)|*.exe|All files|*.*</system:String>
1414

15-
<system:String x:Key="flowlauncher_plugin_use_custom_browser">Use custom web browser instead of Flow default web browser</system:String>
16-
<system:String x:Key="flowlauncher_plugin_browser_path">Browser path:</system:String>
17-
<system:String x:Key="flowlauncher_plugin_url_open_in_new_window">Open url in new window</system:String>
18-
<system:String x:Key="flowlauncher_plugin_url_open_in_private">Open url in private</system:String>
15+
<system:String x:Key="flowlauncher_plugin_url_use_custom_browser">Use custom web browser instead of Flow default web browser</system:String>
16+
<system:String x:Key="flowlauncher_plugin_url_browser_path">Browser path</system:String>
17+
18+
<system:String x:Key="flowlauncher_plugin_url_new_tab">New tab</system:String>
19+
<system:String x:Key="flowlauncher_plugin_url_new_window">New window</system:String>
20+
21+
<system:String x:Key="flowlauncher_plugin_url_private_mode">Private mode</system:String>
1922
</ResourceDictionary>

Plugins/Flow.Launcher.Plugin.Url/SettingsControl.xaml

Lines changed: 74 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -19,73 +19,99 @@
1919
<Grid.RowDefinitions>
2020
<RowDefinition Height="auto" />
2121
<RowDefinition Height="auto" />
22-
<RowDefinition Height="auto" />
23-
<RowDefinition Height="auto" />
2422
</Grid.RowDefinitions>
25-
<Grid.ColumnDefinitions>
26-
<ColumnDefinition Width="Auto" />
27-
<ColumnDefinition Width="*" />
28-
</Grid.ColumnDefinitions>
2923

3024
<CheckBox
3125
Grid.Row="0"
32-
Grid.Column="0"
33-
Grid.ColumnSpan="2"
3426
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
3527
HorizontalAlignment="Left"
3628
VerticalAlignment="Center"
37-
Content="{DynamicResource flowlauncher_plugin_use_custom_browser}"
29+
Content="{DynamicResource flowlauncher_plugin_url_use_custom_browser}"
3830
IsChecked="{Binding Settings.UseCustomBrowser, Mode=TwoWay}" />
3931

40-
<TextBlock
41-
Grid.Row="1"
42-
Grid.Column="0"
43-
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
44-
VerticalAlignment="Center"
45-
FontSize="14"
46-
Text="{DynamicResource flowlauncher_plugin_browser_path}" />
4732
<Grid
4833
Grid.Row="1"
49-
Grid.Column="1"
50-
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}">
34+
HorizontalAlignment="Left"
35+
Visibility="{Binding Settings.UseCustomBrowser, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
36+
<Grid.RowDefinitions>
37+
<RowDefinition Height="auto" />
38+
<RowDefinition Height="auto" />
39+
<RowDefinition Height="auto" />
40+
</Grid.RowDefinitions>
5141
<Grid.ColumnDefinitions>
52-
<ColumnDefinition Width="*" />
5342
<ColumnDefinition Width="Auto" />
43+
<ColumnDefinition Width="*" />
5444
</Grid.ColumnDefinitions>
5545

56-
<TextBox
46+
<TextBlock
47+
Grid.Row="0"
5748
Grid.Column="0"
58-
HorizontalAlignment="Stretch"
49+
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
5950
VerticalAlignment="Center"
60-
IsReadOnly="True"
61-
Text="{Binding Settings.BrowserPath, Mode=OneWay}" />
62-
<Button
51+
FontSize="14"
52+
Text="{DynamicResource flowlauncher_plugin_url_browser_path}" />
53+
<Grid
54+
Grid.Row="0"
6355
Grid.Column="1"
64-
Margin="{StaticResource SettingPanelItemLeftMargin}"
65-
HorizontalAlignment="Left"
66-
VerticalAlignment="Center"
67-
Click="SelectBrowserPath"
68-
Content="{DynamicResource flowlauncher_plugin_url_plugin_choose}" />
69-
</Grid>
56+
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}">
57+
<Grid.ColumnDefinitions>
58+
<ColumnDefinition Width="*" />
59+
<ColumnDefinition Width="Auto" />
60+
</Grid.ColumnDefinitions>
7061

71-
<CheckBox
72-
Grid.Row="2"
73-
Grid.Column="0"
74-
Grid.ColumnSpan="2"
75-
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
76-
HorizontalAlignment="Left"
77-
VerticalAlignment="Center"
78-
Content="{DynamicResource flowlauncher_plugin_url_open_in_new_window}"
79-
IsChecked="{Binding Settings.OpenInNewBrowserWindow, Mode=TwoWay}" />
62+
<TextBox
63+
Grid.Column="0"
64+
HorizontalAlignment="Stretch"
65+
VerticalAlignment="Center"
66+
IsReadOnly="True"
67+
Text="{Binding Settings.BrowserPath, Mode=OneWay}" />
68+
<Button
69+
Grid.Column="1"
70+
Margin="{StaticResource SettingPanelItemLeftMargin}"
71+
HorizontalAlignment="Left"
72+
VerticalAlignment="Center"
73+
Click="SelectBrowserPath"
74+
Content="{DynamicResource flowlauncher_plugin_url_plugin_choose}" />
75+
</Grid>
8076

81-
<CheckBox
82-
Grid.Row="3"
83-
Grid.Column="0"
84-
Grid.ColumnSpan="2"
85-
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
86-
HorizontalAlignment="Left"
87-
VerticalAlignment="Center"
88-
Content="{DynamicResource flowlauncher_plugin_url_open_in_private}"
89-
IsChecked="{Binding Settings.OpenInPrivateMode, Mode=TwoWay}" />
77+
<StackPanel
78+
Grid.Row="1"
79+
Grid.Column="1"
80+
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
81+
Orientation="Horizontal">
82+
<RadioButton Content="{DynamicResource flowlauncher_plugin_url_new_tab}" IsChecked="{Binding Settings.OpenInNewBrowserWindow, Converter={StaticResource InverseBoolConverter}, Mode=TwoWay}" />
83+
<RadioButton Content="{DynamicResource flowlauncher_plugin_url_new_window}" IsChecked="{Binding Settings.OpenInNewBrowserWindow, Mode=TwoWay}" />
84+
</StackPanel>
85+
86+
<TextBlock
87+
Grid.Row="2"
88+
Grid.Column="0"
89+
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
90+
VerticalAlignment="Center"
91+
FontSize="14"
92+
Text="{DynamicResource flowlauncher_plugin_url_private_mode}" />
93+
<Grid
94+
Grid.Row="2"
95+
Grid.Column="1"
96+
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}">
97+
<Grid.ColumnDefinitions>
98+
<ColumnDefinition Width="*" />
99+
<ColumnDefinition Width="Auto" />
100+
</Grid.ColumnDefinitions>
101+
102+
<TextBox
103+
Grid.Column="0"
104+
HorizontalAlignment="Stretch"
105+
VerticalAlignment="Center"
106+
Text="{Binding Settings.PrivateModeArgument, Mode=TwoWay}" />
107+
<CheckBox
108+
Grid.Column="1"
109+
Margin="{StaticResource SettingPanelItemLeftMargin}"
110+
HorizontalAlignment="Left"
111+
VerticalAlignment="Center"
112+
Content=""
113+
IsChecked="{Binding Settings.OpenInPrivateMode, Mode=TwoWay}" />
114+
</Grid>
115+
</Grid>
90116
</Grid>
91117
</UserControl>

0 commit comments

Comments
 (0)