Skip to content

Commit 0edbcfd

Browse files
committed
- Adjust Priority Change Popup Window Design
- Adjust Websearch setting layout - Change and add Websearch String - Change Websearch popup design
1 parent f47de6b commit 0edbcfd

File tree

4 files changed

+117
-62
lines changed

4 files changed

+117
-62
lines changed

Flow.Launcher/PriorityChangeWindow.xaml

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,45 @@
66
xmlns:local="clr-namespace:Flow.Launcher"
77
Loaded="PriorityChangeWindow_Loaded"
88
mc:Ignorable="d"
9+
ResizeMode="NoResize"
910
WindowStartupLocation="CenterScreen"
10-
Title="{DynamicResource changePriorityWindow}" Height="400" Width="350" ResizeMode="NoResize" Background="#f3f3f3">
11+
Title="{DynamicResource changePriorityWindow}" Height="365" Width="350" Background="#F3F3F3" BorderBrush="#cecece">
1112
<Grid>
1213
<Grid.RowDefinitions>
13-
<RowDefinition />
14-
<RowDefinition />
1514
<RowDefinition />
1615
<RowDefinition Height="80"/>
1716
</Grid.RowDefinitions>
18-
<Grid.ColumnDefinitions>
19-
<ColumnDefinition />
20-
</Grid.ColumnDefinitions>
21-
<StackPanel Grid.Row="0" VerticalAlignment="Center">
22-
<TextBlock Grid.Column="0" FontFamily="/Resources/#Segoe Fluent Icons" FontSize="40" TextAlignment="Center"
23-
Margin="0 0 0 0">
24-
&#xe8d0;
25-
</TextBlock>
26-
</StackPanel>
27-
28-
<Border Background="#ffffff" Grid.Row="1" BorderBrush="#cecece" BorderThickness="1" Margin="14 0 14 0" Padding="0 14 0 0" CornerRadius="5">
29-
<StackPanel Orientation="Vertical" >
30-
31-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
32-
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
17+
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
18+
<Grid>
19+
<StackPanel>
20+
<StackPanel Grid.Row="0" Margin="0 0 0 12">
21+
<TextBlock Grid.Column="0" Text="{DynamicResource changePriorityWindow}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
22+
Margin="0 0 0 0" />
23+
</StackPanel>
24+
<StackPanel>
25+
<TextBlock
26+
Text="{DynamicResource priority_tips}" Foreground="#1b1b1b" FontSize="14" TextWrapping="WrapWithOverflow" TextAlignment="Left"/>
27+
</StackPanel>
28+
29+
<StackPanel Orientation="Horizontal" Margin="0 28 0 0">
30+
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
3331
HorizontalAlignment="Left" Text="{DynamicResource currentPriority}" />
34-
<TextBlock x:Name="OldPriority" Grid.Row="0" Grid.Column="1" Margin="14 0 10 0" FontSize="14"
32+
<TextBlock x:Name="OldPriority" Grid.Row="0" Grid.Column="1" Margin="10 0 10 0" FontSize="14"
3533
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" />
36-
</StackPanel>
34+
</StackPanel>
3735

38-
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
39-
<TextBlock FontSize="14" VerticalAlignment="Center"
36+
<StackPanel Orientation="Horizontal" Margin="0 10 0 0">
37+
<TextBlock FontSize="14" VerticalAlignment="Center"
4038
HorizontalAlignment="Right" Text="{DynamicResource newPriority}" />
41-
<TextBox x:Name="tbAction" Margin="14 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
42-
</StackPanel>
43-
44-
</StackPanel>
39+
<TextBox x:Name="tbAction" Margin="10 0 15 0" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
40+
</StackPanel>
41+
</StackPanel>
42+
</Grid>
4543
</Border>
46-
<StackPanel Grid.Row="2" VerticalAlignment="Center">
47-
<TextBlock Foreground="Gray"
48-
Text="{DynamicResource priority_tips}" TextWrapping="WrapWithOverflow" TextAlignment="Center"
49-
Margin="20,0,20,0"/>
50-
</StackPanel>
51-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="3" Grid.Column="1">
52-
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="0 0 10 0" Width="80" Height="30"
44+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
45+
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="0 0 5 0" Width="100" Height="30"
5346
Content="{DynamicResource cancel}" />
54-
<Button x:Name="btnDone" Margin="10 0 0 0" Width="80" Height="30" Click="btnDone_OnClick">
47+
<Button x:Name="btnDone" Margin="5 0 0 0" Width="100" Height="30" Click="btnDone_OnClick">
5548
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
5649
</Button>
5750
</StackPanel>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:system="clr-namespace:System;assembly=mscorlib">
44

5+
<system:String x:Key="flowlauncher_plugin_websearch_window_title">Search Source Setting</system:String>
56
<system:String x:Key="flowlauncher_plugin_websearch_open_search_in">Open search in:</system:String>
67
<system:String x:Key="flowlauncher_plugin_websearch_new_window">New Window</system:String>
78
<system:String x:Key="flowlauncher_plugin_websearch_new_tab">New Tab</system:String>
@@ -14,7 +15,8 @@
1415
<system:String x:Key="flowlauncher_plugin_websearch_action_keyword">Action Keyword</system:String>
1516
<system:String x:Key="flowlauncher_plugin_websearch_url">URL</system:String>
1617
<system:String x:Key="flowlauncher_plugin_websearch_search">Search</system:String>
17-
<system:String x:Key="flowlauncher_plugin_websearch_enable_suggestion">Search suggestions</system:String>
18+
<system:String x:Key="flowlauncher_plugin_websearch_enable_suggestion">Use Search Query Autocomplete: </system:String>
19+
<system:String x:Key="flowlauncher_plugin_websearch_enable_suggestion_provider">Autocomplete Data from: </system:String>
1820
<system:String x:Key="flowlauncher_plugin_websearch_pls_select_web_search">Please select a web search</system:String>
1921
<system:String x:Key="flowlauncher_plugin_websearch_delete_warning">Are you sure you want to delete {0}?</system:String>
2022

Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:vm="clr-namespace:Flow.Launcher.Plugin.WebSearch"
77
mc:Ignorable="d"
8-
ResizeMode="NoResize"
98
WindowStartupLocation="CenterScreen"
10-
Title="Search Source Setting" Height="400" Width="500"
11-
d:DataContext="{d:DesignInstance vm:SearchSourceViewModel}">
9+
Title="{DynamicResource flowlauncher_plugin_websearch_window_title}" Height="425" Width="550"
10+
d:DataContext="{d:DesignInstance vm:SearchSourceViewModel}" Background="#F3F3F3" BorderBrush="#cecece">
1211
<Grid>
12+
<!--
1313
<Grid.RowDefinitions>
1414
<RowDefinition />
1515
<RowDefinition />
@@ -59,5 +59,60 @@
5959
Margin="10 0 10 0" Width="80" Height="35"
6060
Content="{DynamicResource flowlauncher_plugin_websearch_confirm}" />
6161
</StackPanel>
62+
-->
63+
<Grid.RowDefinitions>
64+
<RowDefinition />
65+
<RowDefinition Height="80"/>
66+
</Grid.RowDefinitions>
67+
<Border BorderThickness="0 0 0 1" BorderBrush="#e5e5e5" Background="#ffffff" Padding="26 26 26 0">
68+
<Grid>
69+
<StackPanel>
70+
<StackPanel Grid.Row="0" Margin="0 0 0 12">
71+
<TextBlock Grid.Column="0" Text="{DynamicResource flowlauncher_plugin_websearch_window_title}" FontSize="20" FontWeight="SemiBold" FontFamily="Segoe UI" TextAlignment="Left"
72+
Margin="0 0 0 0" />
73+
</StackPanel>
74+
<StackPanel Orientation="Horizontal">
75+
<TextBlock Margin="10" FontSize="14" VerticalAlignment="Center" Width="100"
76+
HorizontalAlignment="Stretch" Text="{DynamicResource flowlauncher_plugin_websearch_title}" />
77+
<TextBox Text="{Binding SearchSource.Title}" Margin="10" Width="330"
78+
VerticalAlignment="Center" HorizontalAlignment="Left" />
79+
80+
</StackPanel>
81+
<StackPanel Orientation="Horizontal">
82+
<TextBlock Margin="10" FontSize="14" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"
83+
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_icon}" Width="100" />
84+
<Button Click="OnSelectIconClick" Height="35" VerticalAlignment="Center" Margin="10 0 0 0"
85+
Content="{DynamicResource flowlauncher_plugin_websearch_select_icon}" />
86+
<Image Name="imgPreviewIcon" Width="24" Height="24" Margin="14 0 0 0" VerticalAlignment="Center"/>
87+
</StackPanel>
88+
<StackPanel Orientation="Horizontal">
89+
<TextBlock Margin="10" FontSize="14" VerticalAlignment="Center" Width="100"
90+
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_url}" />
91+
<TextBox Text="{Binding SearchSource.Url}" Margin="10" Grid.Row="1" Width="330" Grid.Column="1"
92+
VerticalAlignment="Center" HorizontalAlignment="Left" />
93+
</StackPanel>
94+
<StackPanel Orientation="Horizontal">
95+
<TextBlock Margin="10" FontSize="14" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Width="100"
96+
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_action_keyword}" />
97+
<TextBox Text="{Binding SearchSource.ActionKeyword}" Margin="10 0 10 0" Grid.Row="2" Width="330" Grid.Column="1"
98+
VerticalAlignment="Center" HorizontalAlignment="Left" />
99+
</StackPanel>
100+
<StackPanel Orientation="Horizontal">
101+
<TextBlock Margin="10" FontSize="14" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Width="100"
102+
HorizontalAlignment="Left" Text="{DynamicResource flowlauncher_plugin_websearch_enable}" />
103+
<CheckBox IsChecked="{Binding SearchSource.Enabled}" Margin="10" Grid.Row="3" Grid.Column="1"
104+
VerticalAlignment="Center" />
105+
</StackPanel>
106+
</StackPanel>
107+
</Grid>
108+
</Border>
109+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
110+
<Button Click="OnCancelButtonClick"
111+
Margin="10 0 5 0" Width="100" Height="35"
112+
Content="{DynamicResource flowlauncher_plugin_websearch_cancel}" />
113+
<Button Click="OnConfirmButtonClick"
114+
Margin="5 0 10 0" Width="100" Height="35"
115+
Content="{DynamicResource flowlauncher_plugin_websearch_confirm}" />
116+
</StackPanel>
62117
</Grid>
63118
</Window>

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

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,42 +32,32 @@
3232
</DockPanel>
3333
</DataTemplate>
3434
</UserControl.Resources>
35-
<Grid Margin="14">
35+
<Grid Margin="14 14 14 0">
3636
<Grid.RowDefinitions>
37-
<RowDefinition Height="30" />
3837
<RowDefinition Height="48" />
39-
<RowDefinition Height="45" />
38+
<RowDefinition Height="40" />
4039
<RowDefinition />
40+
<RowDefinition Height="56"/>
4141
<RowDefinition Height="50" />
4242
</Grid.RowDefinitions>
43-
<StackPanel Orientation="Horizontal" Grid.Row="0">
44-
<CheckBox IsChecked="{Binding Settings.EnableSuggestion}"
45-
Margin="0 0 20 0"
46-
Name="EnableSuggestion"
47-
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}" />
48-
<ComboBox ItemsSource="{Binding Settings.Suggestions}"
49-
SelectedItem="{Binding Settings.SelectedSuggestion}"
50-
IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}" />
51-
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSaerchSuggestion is not working -->
52-
</StackPanel>
53-
<StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal">
43+
<StackPanel Grid.Row="0" HorizontalAlignment="Left" Orientation="Horizontal" Margin="14 0 0 0">
5444
<Label Content="{DynamicResource flowlauncher_plugin_websearch_open_search_in}" Margin="0 15 20 0"/>
5545
<RadioButton Name="NewWindowBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_window}" Click="OnNewBrowserWindowClick"
5646
Margin="0 0 20 0"/>
5747
<RadioButton Name="NewTabInBrowser" GroupName="OpenSearchBehaviour" Content="{DynamicResource flowlauncher_plugin_websearch_new_tab}" Click="OnNewTabClick" />
5848
</StackPanel>
59-
<StackPanel Grid.Row="2" HorizontalAlignment="Left" Margin="0 3 0 0">
60-
<Label Content="{DynamicResource flowlaucnher_plugin_websearch_set_browser_path}" Margin="0 0 350 0" HorizontalAlignment="Left" Width="140"/>
61-
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Margin="160,-22,0,0" TextChanged="OnBrowserPathTextChanged"
62-
Width="214" Style="{StaticResource BrowserPathBoxStyle}"/>
63-
<Button x:Name="viewButton" HorizontalAlignment="Left" Margin="400,-30,0,0"
49+
<StackPanel Grid.Row="1" HorizontalAlignment="Left" Margin="14 3 0 0" Orientation="Horizontal">
50+
<Label Content="{DynamicResource flowlaucnher_plugin_websearch_set_browser_path}" Margin="0 0 10 0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
51+
<TextBox x:Name="browserPathBox" HorizontalAlignment="Left" Margin="0,0,0,0" TextChanged="OnBrowserPathTextChanged"
52+
Width="250" Style="{StaticResource BrowserPathBoxStyle}"/>
53+
<Button x:Name="viewButton" HorizontalAlignment="Left" Margin="10,0,0,0"
6454
Click="OnChooseClick" FontSize="13" Content="{DynamicResource flowlauncher_plugin_websearch_choose}" Width="80"/>
6555
</StackPanel>
66-
<ListView ItemsSource="{Binding Settings.SearchSources}"
56+
<ListView Margin="0 18 0 0" ItemsSource="{Binding Settings.SearchSources}"
6757
SelectedItem="{Binding Settings.SelectedSearchSource}"
6858
x:Name="SearchSourcesListView"
6959

70-
Grid.Row="3"
60+
Grid.Row="2"
7161
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"
7262
BorderBrush="DarkGray"
7363
BorderThickness="1"
@@ -95,7 +85,7 @@
9585
</GridViewColumn>
9686
<GridViewColumn Header="{DynamicResource flowlauncher_plugin_websearch_url}"
9787
DisplayMemberBinding="{Binding Url}"
98-
Width="auto">
88+
Width="Auto">
9989
<GridViewColumn.CellTemplate>
10090
<DataTemplate>
10191
<TextBlock Text="{Binding Url}"/>
@@ -105,13 +95,28 @@
10595
</GridView>
10696
</ListView.View>
10797
</ListView>
108-
<StackPanel Grid.Row="4" HorizontalAlignment="Right" Orientation="Horizontal">
98+
<StackPanel Grid.Row="3" HorizontalAlignment="Right" Orientation="Horizontal">
10999
<Button Click="OnDeleteSearchSearchClick" Width="100" Margin="10"
110100
Content="{DynamicResource flowlauncher_plugin_websearch_delete}" />
111101
<Button Click="OnEditSearchSourceClick" Width="100" Margin="10"
112102
Content="{DynamicResource flowlauncher_plugin_websearch_edit}" />
113-
<Button Click="OnAddSearchSearchClick" Width="100" Margin="10 10 10 10"
103+
<Button Click="OnAddSearchSearchClick" Width="100" Margin="10 10 0 10"
114104
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
115105
</StackPanel>
106+
<Border BorderThickness="0 1 0 0" Grid.Row="4" Margin="0 0 0 0" BorderBrush="#cecece" HorizontalAlignment="Stretch">
107+
<DockPanel HorizontalAlignment="Right" Margin="0 14 0 0">
108+
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right">
109+
<Label Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion_provider}" Margin="14 0 10 0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
110+
<ComboBox ItemsSource="{Binding Settings.Suggestions}" VerticalAlignment="Center"
111+
SelectedItem="{Binding Settings.SelectedSuggestion}"
112+
IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}" Margin="0 0 20 0" FontSize="11" Height="30"/>
113+
<Label Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}" Margin="0 0 10 0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
114+
<CheckBox IsChecked="{Binding Settings.EnableSuggestion}"
115+
Margin="0 0 0 0"
116+
Name="EnableSuggestion"/>
117+
</StackPanel>
118+
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSaerchSuggestion is not working -->
119+
</DockPanel>
120+
</Border>
116121
</Grid>
117122
</UserControl>

0 commit comments

Comments
 (0)