Skip to content

Commit 5e7ee68

Browse files
committed
Merge branch 'PluginSearchTextBox' into InstalledLabel5
2 parents 26b14c4 + 9ad95f3 commit 5e7ee68

File tree

128 files changed

+1481
-701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+1481
-701
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.Infrastructure/UserSettings/Settings.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Collections.ObjectModel;
44
using System.Drawing;
@@ -43,6 +43,11 @@ public string Language
4343
public bool UseSound { get; set; } = true;
4444
public bool FirstLaunch { get; set; } = true;
4545

46+
public double SettingWindowWidth { get; set; } = 1000;
47+
public double SettingWindowHeight { get; set; } = 700;
48+
public double SettingWindowTop { get; set; }
49+
public double SettingWindowLeft { get; set; }
50+
4651
public int CustomExplorerIndex { get; set; } = 0;
4752

4853
[JsonIgnore]
@@ -220,4 +225,4 @@ public enum ColorSchemes
220225
Light,
221226
Dark
222227
}
223-
}
228+
}

Flow.Launcher.Plugin/Result.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public string IcoPath
6666
}
6767
}
6868
}
69+
/// <summary>
70+
/// Determines if Icon has a border radius
71+
/// </summary>
72+
public bool RoundedIcon { get; set; } = false;
6973

7074
/// <summary>
7175
/// Delegate function, see <see cref="Icon"/>

Flow.Launcher/ActionKeywords.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
<TextBlock
5959
Grid.Column="0"
6060
Margin="0,0,0,0"
61-
FontFamily="Segoe UI"
6261
FontSize="20"
6362
FontWeight="SemiBold"
6463
Text="{DynamicResource actionKeywordsTitle}"

Flow.Launcher/Converters/OpenResultHotkeyVisibilityConverter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ namespace Flow.Launcher.Converters
1111
[ValueConversion(typeof(bool), typeof(Visibility))]
1212
public class OpenResultHotkeyVisibilityConverter : IValueConverter
1313
{
14-
private const int MaxVisibleHotkeys = 9;
14+
private const int MaxVisibleHotkeys = 10;
1515

1616
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
1717
{
18-
var hotkeyNumber = int.MaxValue;
18+
var number = int.MaxValue;
1919

2020
if (value is ListBoxItem listBoxItem
2121
&& ItemsControl.ItemsControlFromItemContainer(listBoxItem) is ListBox listBox)
22-
hotkeyNumber = listBox.ItemContainerGenerator.IndexFromContainer(listBoxItem) + 1;
22+
number = listBox.ItemContainerGenerator.IndexFromContainer(listBoxItem) + 1;
2323

24-
return hotkeyNumber <= MaxVisibleHotkeys ? Visibility.Visible : Visibility.Collapsed;
24+
return number <= MaxVisibleHotkeys ? Visibility.Visible : Visibility.Collapsed;
2525
}
2626

2727
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();

Flow.Launcher/Converters/OrdinalConverter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ public object Convert(object value, System.Type targetType, object parameter, Cu
1010
{
1111
if (value is ListBoxItem listBoxItem
1212
&& ItemsControl.ItemsControlFromItemContainer(listBoxItem) is ListBox listBox)
13-
return listBox.ItemContainerGenerator.IndexFromContainer(listBoxItem) + 1;
13+
{
14+
var res = listBox.ItemContainerGenerator.IndexFromContainer(listBoxItem) + 1;
15+
return res == 10 ? 0 : res; // 10th item => HOTKEY+0
16+
}
1417

1518
return 0;
1619
}

Flow.Launcher/CustomQueryHotkeySetting.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
<TextBlock
6565
Grid.Column="0"
6666
Margin="0,0,0,0"
67-
FontFamily="Segoe UI"
6867
FontSize="20"
6968
FontWeight="SemiBold"
7069
Text="{DynamicResource customeQueryHotkeyTitle}"

Flow.Launcher/Languages/da.xaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<system:String x:Key="selectPythonDirectory">Vælg</system:String>
5151
<system:String x:Key="hideOnStartup">Skjul Flow Launcher ved opstart</system:String>
5252
<system:String x:Key="hideNotifyIcon">Hide tray icon</system:String>
53+
<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>
5354
<system:String x:Key="querySearchPrecision">Query Search Precision</system:String>
5455
<system:String x:Key="querySearchPrecisionToolTip">Changes minimum match score required for results.</system:String>
5556
<system:String x:Key="ShouldUsePinyin">Should Use Pinyin</system:String>
@@ -69,12 +70,14 @@
6970
<system:String x:Key="currentPriority">Current Priority</system:String>
7071
<system:String x:Key="newPriority">New Priority</system:String>
7172
<system:String x:Key="priority">Priority</system:String>
73+
<system:String x:Key="priorityToolTip">Change Plugin Results Priority</system:String>
7274
<system:String x:Key="pluginDirectory">Plugin bibliotek</system:String>
7375
<system:String x:Key="author">af</system:String>
7476
<system:String x:Key="plugin_init_time">Initaliseringstid:</system:String>
7577
<system:String x:Key="plugin_query_time">Søgetid:</system:String>
7678
<system:String x:Key="plugin_query_version">| Version</system:String>
7779
<system:String x:Key="plugin_query_web">Website</system:String>
80+
<system:String x:Key="plugin_uninstall">Uninstall</system:String>
7881

7982

8083
<!-- Setting Plugin Store -->
@@ -155,11 +158,13 @@
155158
Download updates failed, please check your connection and proxy settings to github-cloud.s3.amazonaws.com,
156159
or go to https://github.com/Flow-Launcher/Flow.Launcher/releases to download updates manually.
157160
</system:String>
158-
<system:String x:Key="releaseNotes">Release Notes:</system:String>
161+
<system:String x:Key="releaseNotes">Release Notes</system:String>
159162
<system:String x:Key="documentation">Usage Tips</system:String>
160163
<system:String x:Key="devtool">DevTools</system:String>
161164
<system:String x:Key="settingfolder">Setting Folder</system:String>
162165
<system:String x:Key="logfolder">Log Folder</system:String>
166+
<system:String x:Key="clearlogfolder">Clear Logs</system:String>
167+
<system:String x:Key="clearlogfolderMessage">Are you sure you want to delete all logs?</system:String>
163168
<system:String x:Key="welcomewindow">Wizard</system:String>
164169

165170
<!-- FileManager Setting Dialog -->

Flow.Launcher/Languages/de.xaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<system:String x:Key="selectPythonDirectory">Auswählen</system:String>
5151
<system:String x:Key="hideOnStartup">Verstecke Flow Launcher bei Systemstart</system:String>
5252
<system:String x:Key="hideNotifyIcon">Statusleistensymbol ausblenden</system:String>
53+
<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>
5354
<system:String x:Key="querySearchPrecision">Suchgenauigkeit abfragen</system:String>
5455
<system:String x:Key="querySearchPrecisionToolTip">Erforderliche Suchergebnisse.</system:String>
5556
<system:String x:Key="ShouldUsePinyin">Pinyin aktivieren</system:String>
@@ -69,12 +70,14 @@
6970
<system:String x:Key="currentPriority">Aktuelle Priorität</system:String>
7071
<system:String x:Key="newPriority">Neue Priorität</system:String>
7172
<system:String x:Key="priority">Priorität</system:String>
73+
<system:String x:Key="priorityToolTip">Change Plugin Results Priority</system:String>
7274
<system:String x:Key="pluginDirectory">Pluginordner</system:String>
7375
<system:String x:Key="author">von</system:String>
7476
<system:String x:Key="plugin_init_time">Initialisierungszeit:</system:String>
7577
<system:String x:Key="plugin_query_time">Abfragezeit:</system:String>
7678
<system:String x:Key="plugin_query_version">Version</system:String>
7779
<system:String x:Key="plugin_query_web">Webseite</system:String>
80+
<system:String x:Key="plugin_uninstall">Deinstallieren</system:String>
7881

7982

8083
<!-- Setting Plugin Store -->
@@ -155,11 +158,13 @@
155158
Download updates failed, please check your connection and proxy settings to github-cloud.s3.amazonaws.com,
156159
or go to https://github.com/Flow-Launcher/Flow.Launcher/releases to download updates manually.
157160
</system:String>
158-
<system:String x:Key="releaseNotes">Versionshinweise:</system:String>
161+
<system:String x:Key="releaseNotes">Versionshinweise</system:String>
159162
<system:String x:Key="documentation">Usage Tips</system:String>
160163
<system:String x:Key="devtool">DevTools</system:String>
161164
<system:String x:Key="settingfolder">Setting Folder</system:String>
162165
<system:String x:Key="logfolder">Log Folder</system:String>
166+
<system:String x:Key="clearlogfolder">Clear Logs</system:String>
167+
<system:String x:Key="clearlogfolderMessage">Are you sure you want to delete all logs?</system:String>
163168
<system:String x:Key="welcomewindow">Wizard</system:String>
164169

165170
<!-- FileManager Setting Dialog -->

0 commit comments

Comments
 (0)