Skip to content

Commit 3e6c869

Browse files
committed
Merge branch 'ProgressBarBindingError' of https://github.com/Sparrkle/Flow.Launcher into ProgressBarBindingError
2 parents ab1ddbb + 33ada18 commit 3e6c869

File tree

27 files changed

+507
-201
lines changed

27 files changed

+507
-201
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,18 @@ public static async Task InitializePluginsAsync(IPublicAPI api)
166166

167167
public static ICollection<PluginPair> ValidPluginsForQuery(Query query)
168168
{
169-
if (NonGlobalPlugins.ContainsKey(query.ActionKeyword))
170-
{
171-
var plugin = NonGlobalPlugins[query.ActionKeyword];
172-
return new List<PluginPair>
173-
{
174-
plugin
175-
};
176-
}
177-
else
178-
{
169+
if (query is null)
170+
return Array.Empty<PluginPair>();
171+
172+
if (!NonGlobalPlugins.ContainsKey(query.ActionKeyword))
179173
return GlobalPlugins;
180-
}
174+
175+
176+
var plugin = NonGlobalPlugins[query.ActionKeyword];
177+
return new List<PluginPair>
178+
{
179+
plugin
180+
};
181181
}
182182

183183
public static async Task<List<Result>> QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token)

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Flow.Launcher.Core.Resource
1717
{
1818
public class Theme
1919
{
20-
private const int ShadowExtraMargin = 12;
20+
private const int ShadowExtraMargin = 32;
2121

2222
private readonly List<string> _themeDirectories = new List<string>();
2323
private ResourceDictionary _oldResource;
@@ -238,9 +238,10 @@ public void AddDropShadowEffectToCurrentTheme()
238238
Property = Border.EffectProperty,
239239
Value = new DropShadowEffect
240240
{
241-
Opacity = 0.4,
242-
ShadowDepth = 2,
243-
BlurRadius = 15
241+
Opacity = 0.3,
242+
ShadowDepth = 12,
243+
Direction = 270,
244+
BlurRadius = 30
244245
}
245246
};
246247

@@ -250,7 +251,7 @@ public void AddDropShadowEffectToCurrentTheme()
250251
marginSetter = new Setter()
251252
{
252253
Property = Border.MarginProperty,
253-
Value = new Thickness(ShadowExtraMargin),
254+
Value = new Thickness(ShadowExtraMargin, 12, ShadowExtraMargin, ShadowExtraMargin),
254255
};
255256
windowBorderStyle.Setters.Add(marginSetter);
256257
}

Flow.Launcher/Languages/en.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<system:String x:Key="selectPythonDirectory">Select</system:String>
5353
<system:String x:Key="hideOnStartup">Hide Flow Launcher on startup</system:String>
5454
<system:String x:Key="hideNotifyIcon">Hide tray icon</system:String>
55+
<system:String x:Key="hideNotifyIconToolTip">When the icon is hidden from the tray, the Settings menu can be opened by right-clicking on the search window.</system:String>
5556
<system:String x:Key="querySearchPrecision">Query Search Precision</system:String>
5657
<system:String x:Key="querySearchPrecisionToolTip">Changes minimum match score required for results.</system:String>
5758
<system:String x:Key="ShouldUsePinyin">Should Use Pinyin</system:String>
@@ -71,6 +72,7 @@
7172
<system:String x:Key="currentPriority">Current Priority</system:String>
7273
<system:String x:Key="newPriority">New Priority</system:String>
7374
<system:String x:Key="priority">Priority</system:String>
75+
<system:String x:Key="priorityToolTip">Change Plugin Results Priority</system:String>
7476
<system:String x:Key="pluginDirectory">Plugin Directory</system:String>
7577
<system:String x:Key="author">by</system:String>
7678
<system:String x:Key="plugin_init_time">Init time:</system:String>

Flow.Launcher/Languages/es-419.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">Prioridad Actual</system:String>
7070
<system:String x:Key="newPriority">Nueva Prioridad</system:String>
7171
<system:String x:Key="priority">Prioridad</system:String>
72+
<system:String x:Key="priorityToolTip">Cambiar la prioridad del resultado del plugin</system:String>
7273
<system:String x:Key="pluginDirectory">Directorio de Plugins</system:String>
7374
<system:String x:Key="author">por</system:String>
7475
<system:String x:Key="plugin_init_time">Tiempo de inicio:</system:String>

Flow.Launcher/Languages/es.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">Prioridad actual</system:String>
7070
<system:String x:Key="newPriority">Nueva prioridad</system:String>
7171
<system:String x:Key="priority">Prioridad</system:String>
72+
<system:String x:Key="priorityToolTip">Cambiar la prioridad del resultado del complemento</system:String>
7273
<system:String x:Key="pluginDirectory">Carpeta de complementos</system:String>
7374
<system:String x:Key="author">por</system:String>
7475
<system:String x:Key="plugin_init_time">Tiempo de inicio:</system:String>

Flow.Launcher/Languages/ko.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">현재 중요도:</system:String>
7070
<system:String x:Key="newPriority">새 중요도:</system:String>
7171
<system:String x:Key="priority">중요도</system:String>
72+
<system:String x:Key="priorityToolTip">플러그인 결과 우선 순위 변경</system:String>
7273
<system:String x:Key="pluginDirectory">플러그인 폴더</system:String>
7374
<system:String x:Key="author">제작자</system:String>
7475
<system:String x:Key="plugin_init_time">초기화 시간:</system:String>

Flow.Launcher/Languages/zh-cn.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">当前优先级</system:String>
7070
<system:String x:Key="newPriority">新优先级</system:String>
7171
<system:String x:Key="priority">优先级</system:String>
72+
<system:String x:Key="priorityToolTip">更改插件结果优先级</system:String>
7273
<system:String x:Key="pluginDirectory">插件目录</system:String>
7374
<system:String x:Key="author">出自</system:String>
7475
<system:String x:Key="plugin_init_time">加载耗时:</system:String>

Flow.Launcher/Languages/zh-tw.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<system:String x:Key="currentPriority">目前優先</system:String>
7070
<system:String x:Key="newPriority">新增優先</system:String>
7171
<system:String x:Key="priority">優先</system:String>
72+
<system:String x:Key="priorityToolTip">更改插件結果優先順序</system:String>
7273
<system:String x:Key="pluginDirectory">外掛資料夾</system:String>
7374
<system:String x:Key="author">作者</system:String>
7475
<system:String x:Key="plugin_init_time">載入耗時:</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@
630630
<ItemsControl Style="{StaticResource SettingGrid}">
631631
<StackPanel Style="{StaticResource TextPanel}">
632632
<TextBlock Style="{DynamicResource SettingTitleLabel}" Text="{DynamicResource hideNotifyIcon}" />
633+
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource hideNotifyIconToolTip}" />
633634
</StackPanel>
634635
<CheckBox IsChecked="{Binding Settings.HideNotifyIcon}" Style="{DynamicResource SideControlCheckBox}" />
635636
</ItemsControl>
@@ -869,6 +870,9 @@
869870
ItemsSource="{Binding Languages}"
870871
SelectedValue="{Binding Language}"
871872
SelectedValuePath="LanguageCode" />
873+
<TextBlock Style="{StaticResource Glyph}">
874+
&#xf2b7;
875+
</TextBlock>
872876
</ItemsControl>
873877
</Border>
874878
</StackPanel>
@@ -995,7 +999,7 @@
995999
Click="OnPluginPriorityClick"
9961000
Content="{Binding Priority, UpdateSourceTrigger=PropertyChanged}"
9971001
Cursor="Hand"
998-
ToolTip="Change Plugin Results Priority">
1002+
ToolTip="{DynamicResource priorityToolTip}">
9991003
<!--#region Priority Button Style-->
10001004
<Button.Resources>
10011005
<Style TargetType="Border">
@@ -2419,7 +2423,7 @@
24192423
</StackPanel>
24202424
<StackPanel
24212425
Grid.Column="2"
2422-
Margin="0,0,30,0"
2426+
Margin="0,0,18,0"
24232427
VerticalAlignment="Center"
24242428
Orientation="Horizontal">
24252429
<TextBlock Margin="0,0,12,0">
@@ -2465,7 +2469,7 @@
24652469
</StackPanel>
24662470
<StackPanel
24672471
Grid.Column="2"
2468-
Margin="0,0,30,0"
2472+
Margin="0,0,18,0"
24692473
VerticalAlignment="Center"
24702474
Orientation="Horizontal">
24712475
<TextBlock Margin="0,0,12,0">

Flow.Launcher/Themes/BlurBlack Darker.xaml

Lines changed: 81 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,130 @@
1-
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:system="clr-namespace:System;assembly=mscorlib">
1+
<ResourceDictionary
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:system="clr-namespace:System;assembly=mscorlib">
45
<ResourceDictionary.MergedDictionaries>
56
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" />
67
</ResourceDictionary.MergedDictionaries>
78

89
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
9-
10-
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}">
10+
<Style x:Key="WindowRadius" TargetType="{x:Type Border}">
11+
<Setter Property="CornerRadius" Value="0" />
12+
</Style>
13+
<Style
14+
x:Key="ItemGlyph"
15+
BasedOn="{StaticResource BaseGlyphStyle}"
16+
TargetType="{x:Type TextBlock}">
1117
<Setter Property="Foreground" Value="#ffffff" />
1218
</Style>
13-
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
19+
<Style
20+
x:Key="QueryBoxStyle"
21+
BasedOn="{StaticResource BaseQueryBoxStyle}"
22+
TargetType="{x:Type TextBox}">
1423
<Setter Property="Foreground" Value="#FFFFFFFF" />
1524
<Setter Property="Background" Value="Transparent" />
1625
</Style>
1726

18-
<Style x:Key="QuerySuggestionBoxStyle" BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}" TargetType="{x:Type TextBox}">
27+
<Style
28+
x:Key="QuerySuggestionBoxStyle"
29+
BasedOn="{StaticResource BaseQuerySuggestionBoxStyle}"
30+
TargetType="{x:Type TextBox}">
1931
<Setter Property="Foreground" Value="LightGray" />
2032
<Setter Property="Opacity" Value="0.5" />
2133
</Style>
2234

23-
<Style x:Key="WindowBorderStyle" BasedOn="{StaticResource BaseWindowBorderStyle}" TargetType="{x:Type Border}">
35+
<Style
36+
x:Key="WindowBorderStyle"
37+
BasedOn="{StaticResource BaseWindowBorderStyle}"
38+
TargetType="{x:Type Border}">
39+
<Setter Property="BorderThickness" Value="1" />
40+
<Setter Property="BorderBrush" Value="#444444" />
41+
<Setter Property="CornerRadius" Value="0" />
2442
<Setter Property="Background">
2543
<Setter.Value>
26-
<SolidColorBrush Color="Black" Opacity="0.6"/>
44+
<SolidColorBrush Opacity="0.9" Color="Black" />
2745
</Setter.Value>
2846
</Setter>
2947
</Style>
3048

31-
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
49+
<Style
50+
x:Key="WindowStyle"
51+
BasedOn="{StaticResource BaseWindowStyle}"
52+
TargetType="{x:Type Window}">
3253
<Setter Property="Background">
3354
<Setter.Value>
34-
<SolidColorBrush Color="Black" Opacity="0.7"/>
55+
<SolidColorBrush Opacity="0.7" Color="Black" />
3556
</Setter.Value>
3657
</Setter>
3758
</Style>
3859

39-
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
60+
<Style
61+
x:Key="PendingLineStyle"
62+
BasedOn="{StaticResource BasePendingLineStyle}"
63+
TargetType="{x:Type Line}">
4064
<Setter Property="Stroke" Value="White" />
4165
</Style>
4266

43-
<!-- Item Style -->
44-
<Style x:Key="ItemTitleStyle" BasedOn="{StaticResource BaseItemTitleStyle}" TargetType="{x:Type TextBlock}">
45-
<Setter Property="Margin" Value="0, -10"/>
46-
<Setter Property="Foreground" Value="#FFFFFFFF"/>
67+
<!-- Item Style -->
68+
<Style
69+
x:Key="ItemTitleStyle"
70+
BasedOn="{StaticResource BaseItemTitleStyle}"
71+
TargetType="{x:Type TextBlock}">
72+
<Setter Property="Margin" Value="0,-10" />
73+
<Setter Property="Foreground" Value="#FFFFFFFF" />
4774
</Style>
48-
<Style x:Key="ItemSubTitleStyle" BasedOn="{StaticResource BaseItemSubTitleStyle}" TargetType="{x:Type TextBlock}" >
49-
<Setter Property="Foreground" Value="#FFFFFFFF"/>
75+
<Style
76+
x:Key="ItemSubTitleStyle"
77+
BasedOn="{StaticResource BaseItemSubTitleStyle}"
78+
TargetType="{x:Type TextBlock}">
79+
<Setter Property="Foreground" Value="#FFFFFFFF" />
5080
<Setter Property="Opacity" Value="0.5" />
5181
</Style>
52-
<Style x:Key="ItemTitleSelectedStyle" BasedOn="{StaticResource BaseItemTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
53-
<Setter Property="Margin" Value="0, -10"/>
54-
<Setter Property="Foreground" Value="#FFFFFFFF"/>
82+
<Style
83+
x:Key="ItemTitleSelectedStyle"
84+
BasedOn="{StaticResource BaseItemTitleSelectedStyle}"
85+
TargetType="{x:Type TextBlock}">
86+
<Setter Property="Margin" Value="0,-10" />
87+
<Setter Property="Foreground" Value="#FFFFFFFF" />
5588
</Style>
56-
<Style x:Key="ItemSubTitleSelectedStyle" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}" TargetType="{x:Type TextBlock}" >
57-
<Setter Property="Foreground" Value="#FFFFFFFF"/>
89+
<Style
90+
x:Key="ItemSubTitleSelectedStyle"
91+
BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}"
92+
TargetType="{x:Type TextBlock}">
93+
<Setter Property="Foreground" Value="#FFFFFFFF" />
5894
<Setter Property="Opacity" Value="0.5" />
5995
</Style>
60-
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#356ef3</SolidColorBrush>
96+
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#19ffffff</SolidColorBrush>
6197

62-
<!-- button style in the middle of the scrollbar -->
63-
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
98+
<!-- button style in the middle of the scrollbar -->
99+
<Style
100+
x:Key="ThumbStyle"
101+
BasedOn="{StaticResource BaseThumbStyle}"
102+
TargetType="{x:Type Thumb}">
64103
<Setter Property="Template">
65104
<Setter.Value>
66105
<ControlTemplate TargetType="{x:Type Thumb}">
67-
<Border CornerRadius="2" DockPanel.Dock="Right" Background="#FFFFFF" Opacity="0.5" BorderBrush="Transparent" BorderThickness="0" />
106+
<Border
107+
Background="#FFFFFF"
108+
BorderBrush="Transparent"
109+
BorderThickness="0"
110+
CornerRadius="2"
111+
DockPanel.Dock="Right"
112+
Opacity="0.5" />
68113
</ControlTemplate>
69114
</Setter.Value>
70115
</Setter>
71116
</Style>
72117

73-
<Style x:Key="ScrollBarStyle" BasedOn="{StaticResource BaseScrollBarStyle}" TargetType="{x:Type ScrollBar}">
74-
<Setter Property="Background" Value="#a0a0a0"/>
118+
<Style
119+
x:Key="ScrollBarStyle"
120+
BasedOn="{StaticResource BaseScrollBarStyle}"
121+
TargetType="{x:Type ScrollBar}">
122+
<Setter Property="Background" Value="#a0a0a0" />
75123
</Style>
76-
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}" BasedOn="{StaticResource BaseSearchIconStyle}">
124+
<Style
125+
x:Key="SearchIconStyle"
126+
BasedOn="{StaticResource BaseSearchIconStyle}"
127+
TargetType="{x:Type Path}">
77128
<Setter Property="Fill" Value="#ffffff" />
78129
<Setter Property="Width" Value="32" />
79130
<Setter Property="Height" Value="32" />

0 commit comments

Comments
 (0)