Skip to content

Commit 762df7f

Browse files
committed
- Remove colon Action keyword String
- Fix layout for init/query time/version/plugin store - change action keyword to button - add listbox bottom margin - add margin when select list item for easy to distinguish.
1 parent bec7d62 commit 762df7f

File tree

3 files changed

+58
-38
lines changed

3 files changed

+58
-38
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<system:String x:Key="browserMorePlugins">Find more plugins</system:String>
4747
<system:String x:Key="enable">On</system:String>
4848
<system:String x:Key="disable">Off</system:String>
49-
<system:String x:Key="actionKeywords">Action keyword:</system:String>
49+
<system:String x:Key="actionKeywords">Action keyword</system:String>
5050
<system:String x:Key="currentActionKeywords">Current action keyword:</system:String>
5151
<system:String x:Key="newActionKeyword">New action keyword:</system:String>
5252
<system:String x:Key="currentPriority">Current Priority:</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
</MultiTrigger.Conditions>
230230
<Setter TargetName="Bd" Property="Background" Value="#ffffff" />
231231
<Setter TargetName="Bd" Property="BorderBrush" Value="#e5e5e5" />
232-
<Setter TargetName="Bd" Property="Margin" Value="0 10 0 10" />
232+
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 10" />
233233

234234

235235
</MultiTrigger>
@@ -241,7 +241,7 @@
241241
<Setter TargetName="Bd" Property="Background" Value="#ffffff" />
242242
<Setter TargetName="Bd" Property="BorderBrush" Value="#e5e5e5" />
243243
<Setter TargetName="Bd" Property="CornerRadius" Value="5" />
244-
<Setter TargetName="Bd" Property="Margin" Value="0 10 0 10" />
244+
<Setter TargetName="Bd" Property="Margin" Value="0 0 0 10" />
245245

246246

247247
</MultiTrigger>
@@ -257,13 +257,6 @@
257257
<Setter Property="Height" Value="Auto" />
258258
</Style>
259259

260-
<Style x:Key="PriorityButton" TargetType="Button">
261-
<Style.Triggers>
262-
<DataTrigger Binding="{Binding ElementName=PriorityButton, UpdateSourceTrigger=PropertyChanged, Path=Text}" Value="1">
263-
<Setter Property="Foreground" Value="Red" />
264-
</DataTrigger>
265-
</Style.Triggers>
266-
</Style>
267260

268261
</Window.Resources>
269262

@@ -542,7 +535,7 @@
542535
Margin="0, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
543536
ItemContainerStyle="{StaticResource PluginList}"
544537
ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False"
545-
Padding="0" Width="Auto" HorizontalAlignment="Stretch">
538+
Padding="0 0 0 18" Width="Auto" HorizontalAlignment="Stretch">
546539

547540
<ListBox.ItemTemplate>
548541
<DataTemplate>
@@ -618,22 +611,36 @@
618611
<StackPanel Orientation="Vertical" Margin="0 12 0 0">
619612
<StackPanel>
620613
<Border Style="{DynamicResource SettingGroupBox}"
621-
Visibility="{Binding ActionKeywordsVisibility}" Height="52"
614+
Visibility="{Binding ActionKeywordsVisibility}" Height="52" Padding="0"
622615
Width="auto" BorderThickness="0 1 0 0" CornerRadius="0">
623-
<ItemsControl Style="{DynamicResource SettingGrid}">
624-
<StackPanel Style="{StaticResource TextPanel}"
625-
Orientation="Horizontal">
626-
<TextBlock Text="{DynamicResource actionKeywords}"
616+
<ItemsControl VerticalAlignment="Center" Padding="22 0 18 0">
617+
<DockPanel>
618+
<TextBlock FontFamily="/Resources/#Segoe Fluent Icons" FontSize="20" DockPanel.Dock="Left"
619+
VerticalAlignment="Center" Margin="48 0 10 0">&#xe819;</TextBlock>
620+
<TextBlock Grid.Column="0" Text="{DynamicResource actionKeywords}"
627621
Style="{DynamicResource SettingTitleLabel}"
628-
Margin="48 0 0 0" />
629-
<TextBlock Text="{Binding ActionKeywordsText}"
622+
Margin="0 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Left" DockPanel.Dock="Left"/>
623+
624+
625+
<Button Grid.Column="2" Content="{Binding ActionKeywordsText}"
630626
DockPanel.Dock="Right"
631627
Visibility="{Binding ActionKeywordsVisibility}"
632628
ToolTip="Change Action Keywords"
633-
Margin="5 0 0 0" Cursor="Hand" Foreground="Blue"
634-
MouseUp="OnPluginActionKeywordsClick"
635-
MaxWidth="100" HorizontalAlignment="Right" />
636-
</StackPanel>
629+
Margin="5 0 0 0" Cursor="Hand" FontWeight="Bold"
630+
Click="OnPluginActionKeywordsClick" HorizontalAlignment="Right"
631+
Width="100" Height="32">
632+
633+
<Button.Resources>
634+
<Style TargetType="Border">
635+
<Setter Property="CornerRadius" Value="2"/>
636+
<Setter Property="BorderThickness" Value="1 1 1 2"/>
637+
<Setter Property="BorderBrush" Value="#ececec"/>
638+
<Setter Property="Background" Value="#ffffff"/>
639+
640+
</Style>
641+
</Button.Resources>
642+
</Button>
643+
</DockPanel>
637644

638645
</ItemsControl>
639646
</Border>
@@ -652,29 +659,36 @@
652659
</StackPanel>
653660

654661
<StackPanel>
655-
<Border Style="{DynamicResource SettingGroupBox}"
662+
<Border Style="{DynamicResource SettingGroupBox}" CornerRadius="0"
656663
Visibility="{Binding ActionKeywordsVisibility}"
657664
VerticalAlignment="Center" Margin="0" BorderThickness="0 1 0 0"
658-
Padding="0 12 0 0">
665+
Padding="0 12 0 0" >
659666
<ItemsControl Style="{DynamicResource SettingGrid}">
660667
<StackPanel Style="{StaticResource TextPanel}"
661-
Orientation="Horizontal" VerticalAlignment="Center">
662-
<TextBlock Text="{DynamicResource plugin_init_time}"
663-
FontSize="11" Margin="10 0 0 0" MaxWidth="100" />
664-
<TextBlock Text="{Binding InitilizaTime}" FontSize="11"
668+
Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 -14 0">
669+
<TextBlock Text="{DynamicResource plugin_init_time}"
670+
FontSize="11" Margin="10 0 0 0" MaxWidth="100" Foreground="#8F8F8F" />
671+
<TextBlock Text="{Binding InitilizaTime}" FontSize="11" Foreground="#8F8F8F"
665672
Margin="5 0 0 0" MaxWidth="100" />
673+
<TextBlock Text="|"
674+
FontSize="11" Margin="5 0 0 0" MaxWidth="100" Foreground="#8F8F8F"
675+
VerticalAlignment="Center" />
666676
<TextBlock Text="{DynamicResource plugin_query_time}"
667-
FontSize="10" Margin="10 0 0 0" MaxWidth="100" />
668-
<TextBlock Text="{Binding QueryTime}" FontSize="11"
677+
FontSize="11" Margin="5 0 0 0" MaxWidth="100" Foreground="#8F8F8F" />
678+
<TextBlock Text="{Binding QueryTime}" FontSize="11" Foreground="#8F8F8F"
669679
Margin="5 0 0 0" MaxWidth="100" />
670-
<TextBlock Text="{Binding PluginPair.Metadata.Version}"
680+
<TextBlock Text="| version"
681+
FontSize="11" Margin="5 0 0 0" MaxWidth="100" Foreground="#8F8F8F"
682+
VerticalAlignment="Center" />
683+
<TextBlock Text="{Binding PluginPair.Metadata.Version}" Foreground="#8F8F8F"
671684
FontSize="11" Margin="5 0 0 0" MaxWidth="100"
672685
VerticalAlignment="Center" />
673-
</StackPanel>
674-
<TextBlock Text="{DynamicResource pluginDirectory}"
686+
<TextBlock Text="{DynamicResource pluginDirectory}"
675687
MaxWidth="120" Cursor="Hand" Margin="10,0,0,0"
676688
MouseUp="OnPluginDirecotyClick" Foreground="Blue"
677-
HorizontalAlignment="Right" />
689+
HorizontalAlignment="Right" FontSize="12" VerticalAlignment="Center"/>
690+
</StackPanel>
691+
678692
</ItemsControl>
679693
</Border>
680694

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,13 @@ private void OnPluginPriorityClick(object sender, RoutedEventArgs e)
193193

194194
}
195195

196-
private void OnPluginActionKeywordsClick(object sender, MouseButtonEventArgs e)
196+
private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e)
197197
{
198-
if (e.ChangedButton == MouseButton.Left)
199-
{
198+
200199
var id = viewModel.SelectedPlugin.PluginPair.Metadata.ID;
201200
ActionKeywords changeKeywordsWindow = new ActionKeywords(id, settings, viewModel.SelectedPlugin);
202201
changeKeywordsWindow.ShowDialog();
203-
}
202+
204203
}
205204

206205
private void OnPluginNameClick(object sender, MouseButtonEventArgs e)
@@ -266,6 +265,13 @@ private void OpenPluginFolder(object sender, RoutedEventArgs e)
266265
FilesFolders.OpenPath(Path.Combine(DataLocation.DataDirectory(), Constant.Themes));
267266
}
268267

268+
/*
269+
private void OnPluginActionKeywordsClick(object sender, RoutedEventArgs e)
270+
{
271+
272+
}
273+
*/
274+
269275
/*private void OnPluginPriorityClick(object sender, RoutedEventArgs e)
270276
{
271277

0 commit comments

Comments
 (0)