diff --git a/Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs b/Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs
index f98815c1a..bb1279b2c 100644
--- a/Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs
+++ b/Flow.Launcher.Core/ExternalPlugins/UserPlugin.cs
@@ -1,4 +1,6 @@
-namespace Flow.Launcher.Core.ExternalPlugins
+using System;
+
+namespace Flow.Launcher.Core.ExternalPlugins
{
public record UserPlugin
{
@@ -12,5 +14,8 @@
public string UrlDownload { get; set; }
public string UrlSourceCode { get; set; }
public string IcoPath { get; set; }
+ public DateTime LatestReleaseDate { get; set; }
+ public DateTime DateAdded { get; set; }
+
}
}
diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
index 8dd4ddaad..0e30fe01b 100644
--- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
+++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs
@@ -283,6 +283,7 @@ namespace Flow.Launcher.Infrastructure.Image
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.UriSource = new Uri(path);
+ image.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
image.EndInit();
return image;
}
diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 211bc1798..d42fd425f 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -199,7 +199,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
public bool LeaveCmdOpen { get; set; }
public bool HideWhenDeactive { get; set; } = true;
- public bool RememberLastLaunchLocation { get; set; }
+ public SearchWindowPositions SearchWindowPosition { get; set; } = SearchWindowPositions.MouseScreenCenter;
public bool IgnoreHotkeysOnFullscreen { get; set; }
public HttpProxy Proxy { get; set; } = new HttpProxy();
@@ -225,4 +225,12 @@ namespace Flow.Launcher.Infrastructure.UserSettings
Light,
Dark
}
+ public enum SearchWindowPositions
+ {
+ RememberLastLaunchLocation,
+ MouseScreenCenter,
+ MouseScreenCenterTop,
+ MouseScreenLeftTop,
+ MouseScreenRightTop
+ }
}
diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj
index f429586ce..c4341288f 100644
--- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj
+++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj
@@ -50,7 +50,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Flow.Launcher/Converters/BoolToVisibilityConverter.cs b/Flow.Launcher/Converters/BoolToVisibilityConverter.cs
new file mode 100644
index 000000000..ad474d693
--- /dev/null
+++ b/Flow.Launcher/Converters/BoolToVisibilityConverter.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace Flow.Launcher.Converters
+{
+ public class BoolToVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
+ {
+ if (parameter != null)
+ {
+ if (value is true)
+ {
+ return Visibility.Collapsed;
+ }
+
+ else
+ {
+ return Visibility.Visible;
+ }
+ }
+ else {
+ if (value is true)
+ {
+ return Visibility.Visible;
+ }
+
+ else {
+ return Visibility.Collapsed;
+ }
+ }
+ }
+
+ public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();
+ }
+}
diff --git a/Flow.Launcher/Converters/TextConverter.cs b/Flow.Launcher/Converters/TextConverter.cs
new file mode 100644
index 000000000..90d445776
--- /dev/null
+++ b/Flow.Launcher/Converters/TextConverter.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Globalization;
+using System.Windows.Data;
+using Flow.Launcher.Core.Resource;
+using Flow.Launcher.ViewModel;
+
+namespace Flow.Launcher.Converters
+{
+ public class TextConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var ID = value.ToString();
+ switch(ID)
+ {
+ case PluginStoreItemViewModel.NewRelease:
+ return InternationalizationManager.Instance.GetTranslation("pluginStore_NewRelease");
+ case PluginStoreItemViewModel.RecentlyUpdated:
+ return InternationalizationManager.Instance.GetTranslation("pluginStore_RecentlyUpdated");
+ case PluginStoreItemViewModel.None:
+ return InternationalizationManager.Instance.GetTranslation("pluginStore_None");
+ case PluginStoreItemViewModel.Installed:
+ return InternationalizationManager.Instance.GetTranslation("pluginStore_Installed");
+ default:
+ return ID;
+ }
+
+ }
+
+ public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();
+ }
+}
diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj
index 66cc911ee..813a44527 100644
--- a/Flow.Launcher/Flow.Launcher.csproj
+++ b/Flow.Launcher/Flow.Launcher.csproj
@@ -83,6 +83,7 @@
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -114,4 +115,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Flow.Launcher/Images/app_missing_img.png b/Flow.Launcher/Images/app_missing_img.png
index b86c29ac9..27e366bbc 100644
Binary files a/Flow.Launcher/Images/app_missing_img.png and b/Flow.Launcher/Images/app_missing_img.png differ
diff --git a/Flow.Launcher/Languages/da.xaml b/Flow.Launcher/Languages/da.xaml
index 7ec94fed1..25bd195dd 100644
--- a/Flow.Launcher/Languages/da.xaml
+++ b/Flow.Launcher/Languages/da.xaml
@@ -77,13 +77,13 @@
Søgetid:
| Version
Website
- Uninstall
+ Uninstall
Plugin Store
Refresh
- Install
+ Install
Tema
diff --git a/Flow.Launcher/Languages/de.xaml b/Flow.Launcher/Languages/de.xaml
index a1b0b3b9b..ebd549adf 100644
--- a/Flow.Launcher/Languages/de.xaml
+++ b/Flow.Launcher/Languages/de.xaml
@@ -77,13 +77,13 @@
Abfragezeit:
Version
Webseite
- Deinstallieren
+ Deinstallieren
Erweiterungen laden
Aktualisieren
- Installieren
+ Installieren
Design
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 2019c1b66..092065688 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -23,6 +23,8 @@
Text
Game Mode
Suspend the use of Hotkeys.
+ Position Reset
+ Reset search window position
Flow Launcher Settings
@@ -33,7 +35,13 @@
Error setting launch on startup
Hide Flow Launcher when focus is lost
Do not show new version notifications
+ Search Window Position
Remember last launch location
+ Remember Last Location
+ Mouse Focused Screen - Center
+ Mouse Focused Screen - Center Top
+ Mouse Focused Screen - Left Top
+ Mouse Focused Screen - Right Top
Language
Last Query Style
Show/Hide previous results when Flow Launcher is reactivated.
@@ -41,6 +49,7 @@
Select last Query
Empty last Query
Maximum results shown
+ You can also quickly adjust this by using CTRL+Plus and CTRL+Minus.
Ignore hotkeys in fullscreen mode
Disable Flow Launcher activation when a full screen application is active (Recommended for games).
Default File Manager
@@ -83,13 +92,24 @@
Query time:
| Version
Website
- Uninstall
Plugin Store
+ New Release
+ Recently Updated
+ Plugins
+ Installed
Refresh
- Install
+ Install
+ Uninstall
+ Update
+ Plug-in already installed
+ New Version
+ This plug-in has been updated within the last 7 days
+ New Update is Available
+
+
Theme
@@ -131,6 +151,7 @@
Query window shadow effect
Shadow effect has a substantial usage of GPU. Not recommended if your computer performance is limited.
Window Width Size
+ You can also quickly adjust this by using Ctrl+[ and Ctrl+].
Use Segoe Fluent Icons
Use Segoe Fluent Icons for query results where supported
diff --git a/Flow.Launcher/Languages/es-419.xaml b/Flow.Launcher/Languages/es-419.xaml
index 84a492d15..a410f4b32 100644
--- a/Flow.Launcher/Languages/es-419.xaml
+++ b/Flow.Launcher/Languages/es-419.xaml
@@ -77,13 +77,13 @@
Tiempo de consulta:
| Versión
Sitio web
- Uninstall
+ Uninstall
Tienda de Plugins
Recargar
- Instalar
+ Instalar
Tema
diff --git a/Flow.Launcher/Languages/fr.xaml b/Flow.Launcher/Languages/fr.xaml
index 141d868a2..edc5e4f07 100644
--- a/Flow.Launcher/Languages/fr.xaml
+++ b/Flow.Launcher/Languages/fr.xaml
@@ -77,13 +77,13 @@
Utilisation :
| Version
Website
- Désinstaller
+ Désinstaller
Plugin Store
Refresh
- Install
+ Install
Thèmes
diff --git a/Flow.Launcher/Languages/it.xaml b/Flow.Launcher/Languages/it.xaml
index 4304aead8..30a401875 100644
--- a/Flow.Launcher/Languages/it.xaml
+++ b/Flow.Launcher/Languages/it.xaml
@@ -77,13 +77,13 @@
Tempo ricerca:
| Versione
Sito Web
- Disinstalla
+ Disinstalla
Negozio dei Plugin
Aggiorna
- Installa
+ Installa
Tema
diff --git a/Flow.Launcher/Languages/ja.xaml b/Flow.Launcher/Languages/ja.xaml
index 8c1386371..a2dcfb6a0 100644
--- a/Flow.Launcher/Languages/ja.xaml
+++ b/Flow.Launcher/Languages/ja.xaml
@@ -77,13 +77,13 @@
クエリ時間:
| バージョン
ウェブサイト
- アンインストール
+ アンインストール
プラグインストア
Refresh
- Install
+ Install
テーマ
diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml
index 809c5ccf8..acb68cb4f 100644
--- a/Flow.Launcher/Languages/ko.xaml
+++ b/Flow.Launcher/Languages/ko.xaml
@@ -77,13 +77,13 @@
쿼리 시간:
| 버전
웹사이트
- 제거
+ 제거
플러그인 스토어
새로고침
- 설치
+ 설치
테마
diff --git a/Flow.Launcher/Languages/nb.xaml b/Flow.Launcher/Languages/nb.xaml
index e90a32347..0848e9d64 100644
--- a/Flow.Launcher/Languages/nb.xaml
+++ b/Flow.Launcher/Languages/nb.xaml
@@ -77,13 +77,13 @@
Query time:
| Version
Website
- Uninstall
+ Uninstall
Plugin Store
Refresh
- Install
+ Install
Theme
diff --git a/Flow.Launcher/Languages/nl.xaml b/Flow.Launcher/Languages/nl.xaml
index 77a8e9e29..e398afa51 100644
--- a/Flow.Launcher/Languages/nl.xaml
+++ b/Flow.Launcher/Languages/nl.xaml
@@ -77,13 +77,13 @@
Query tijd:
| Versie
Website
- Uninstall
+ Uninstall
Plugin Winkel
Vernieuwen
- Installeren
+ Installeren
Thema
diff --git a/Flow.Launcher/Languages/pl.xaml b/Flow.Launcher/Languages/pl.xaml
index bd7acd4e8..fc5badd69 100644
--- a/Flow.Launcher/Languages/pl.xaml
+++ b/Flow.Launcher/Languages/pl.xaml
@@ -77,13 +77,13 @@
Czas zapytania:
| Version
Website
- Odinstalowywanie
+ Odinstalowywanie
Plugin Store
Refresh
- Install
+ Install
Skórka
diff --git a/Flow.Launcher/Languages/pt-br.xaml b/Flow.Launcher/Languages/pt-br.xaml
index 28ed30916..f6fc062c6 100644
--- a/Flow.Launcher/Languages/pt-br.xaml
+++ b/Flow.Launcher/Languages/pt-br.xaml
@@ -77,13 +77,13 @@
Tempo de consulta:
| Version
Website
- Desinstalar
+ Desinstalar
Plugin Store
Refresh
- Install
+ Install
Tema
diff --git a/Flow.Launcher/Languages/pt-pt.xaml b/Flow.Launcher/Languages/pt-pt.xaml
index e7179e6e8..b19fc9924 100644
--- a/Flow.Launcher/Languages/pt-pt.xaml
+++ b/Flow.Launcher/Languages/pt-pt.xaml
@@ -77,13 +77,13 @@
Tempo de consulta:
| Versão
Site
- Desinstalar
+ Desinstalar
Loja de plugins
Recarregar
- Instalar
+ Instalar
Tema
diff --git a/Flow.Launcher/Languages/ru.xaml b/Flow.Launcher/Languages/ru.xaml
index 2c8ca9fa3..87b3dd4ef 100644
--- a/Flow.Launcher/Languages/ru.xaml
+++ b/Flow.Launcher/Languages/ru.xaml
@@ -77,13 +77,13 @@
Запрос:
| Version
Website
- Удалить
+ Удалить
Plugin Store
Refresh
- Install
+ Install
Тема
diff --git a/Flow.Launcher/Languages/sk.xaml b/Flow.Launcher/Languages/sk.xaml
index c4d5de6bf..ee703bcf8 100644
--- a/Flow.Launcher/Languages/sk.xaml
+++ b/Flow.Launcher/Languages/sk.xaml
@@ -77,13 +77,13 @@
Trvanie dopytu:
| Verzia
Webstránka
- Odinštalovať
+ Odinštalovať
Repozitár pluginov
Obnoviť
- Inštalovať
+ Inštalovať
Motív
diff --git a/Flow.Launcher/Languages/sr.xaml b/Flow.Launcher/Languages/sr.xaml
index 61f619fd0..e805860dc 100644
--- a/Flow.Launcher/Languages/sr.xaml
+++ b/Flow.Launcher/Languages/sr.xaml
@@ -77,13 +77,13 @@
Vreme upita:
| Version
Website
- Uninstall
+ Uninstall
Plugin Store
Refresh
- Install
+ Install
Tema
diff --git a/Flow.Launcher/Languages/tr.xaml b/Flow.Launcher/Languages/tr.xaml
index fb8e1d6f6..4a016ced8 100644
--- a/Flow.Launcher/Languages/tr.xaml
+++ b/Flow.Launcher/Languages/tr.xaml
@@ -77,13 +77,13 @@
Sorgu Süresi:
Sürüm
İnternet Sitesi
- Kaldır
+ Kaldır
Eklenti Mağazası
Yenile
- İndir
+ İndir
Temalar
diff --git a/Flow.Launcher/Languages/uk-UA.xaml b/Flow.Launcher/Languages/uk-UA.xaml
index 8115a5dd1..a34ed4e8b 100644
--- a/Flow.Launcher/Languages/uk-UA.xaml
+++ b/Flow.Launcher/Languages/uk-UA.xaml
@@ -77,13 +77,13 @@
Запит:
| Версія
Сайт
- Uninstall
+ Uninstall
Магазин плагінів
Оновити
- Встановити
+ Встановити
Тема
diff --git a/Flow.Launcher/Languages/zh-cn.xaml b/Flow.Launcher/Languages/zh-cn.xaml
index d80bfdaf6..b62736d16 100644
--- a/Flow.Launcher/Languages/zh-cn.xaml
+++ b/Flow.Launcher/Languages/zh-cn.xaml
@@ -77,13 +77,13 @@
查询耗时:
| 版本
官方网站
- 卸载
+ 卸载
插件商店
刷新
- 安装
+ 安装
主题
diff --git a/Flow.Launcher/Languages/zh-tw.xaml b/Flow.Launcher/Languages/zh-tw.xaml
index 71cc887cf..69abbe401 100644
--- a/Flow.Launcher/Languages/zh-tw.xaml
+++ b/Flow.Launcher/Languages/zh-tw.xaml
@@ -77,13 +77,13 @@
查詢耗時:
| 版本
官方網站
- 解除安裝
+ 解除安裝
外掛商店
重新整理
- 安裝
+ 安裝
主題
diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml
index dc3b3f145..9f7d16ab1 100644
--- a/Flow.Launcher/MainWindow.xaml
+++ b/Flow.Launcher/MainWindow.xaml
@@ -84,6 +84,22 @@
Modifiers="Ctrl" />
+
+
+
+
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 332e0f502..fe6c119e1 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -91,6 +91,7 @@ namespace Flow.Launcher
InitializeColorScheme();
WindowsInteropHelper.DisableControlBox(this);
InitProgressbarAnimation();
+ InitializePosition();
// since the default main window visibility is visible
// so we need set focus during startup
QueryTextBox.Focus();
@@ -108,7 +109,6 @@ namespace Flow.Launcher
animationSound.Position = TimeSpan.Zero;
animationSound.Play();
}
-
UpdatePosition();
Activate();
QueryTextBox.Focus();
@@ -161,6 +161,7 @@ namespace Flow.Launcher
_viewModel.QueryTextCursorMovedToEnd = false;
}
break;
+
}
};
_settings.PropertyChanged += (o, e) =>
@@ -176,21 +177,40 @@ namespace Flow.Launcher
case nameof(Settings.Hotkey):
UpdateNotifyIconText();
break;
+ case nameof(Settings.WindowLeft):
+ Left = _settings.WindowLeft;
+ break;
+ case nameof(Settings.WindowTop):
+ Top = _settings.WindowTop;
+ break;
}
};
}
private void InitializePosition()
{
- if (_settings.RememberLastLaunchLocation)
+ switch (_settings.SearchWindowPosition)
{
- Top = _settings.WindowTop;
- Left = _settings.WindowLeft;
- }
- else
- {
- Left = WindowLeft();
- Top = WindowTop();
+ case SearchWindowPositions.RememberLastLaunchLocation:
+ Top = _settings.WindowTop;
+ Left = _settings.WindowLeft;
+ break;
+ case SearchWindowPositions.MouseScreenCenter:
+ Left = HorizonCenter();
+ Top = VerticalCenter();
+ break;
+ case SearchWindowPositions.MouseScreenCenterTop:
+ Left = HorizonCenter();
+ Top = 10;
+ break;
+ case SearchWindowPositions.MouseScreenLeftTop:
+ Left = 10;
+ Top = 10;
+ break;
+ case SearchWindowPositions.MouseScreenRightTop:
+ Left = HorizonRight();
+ Top = 10;
+ break;
}
}
@@ -199,8 +219,9 @@ namespace Flow.Launcher
var menu = contextMenu;
((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")";
((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode");
- ((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
- ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
+ ((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("PositionReset");
+ ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
+ ((MenuItem)menu.Items[5]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
}
private void InitializeNotifyIcon()
@@ -226,6 +247,10 @@ namespace Flow.Launcher
{
Header = InternationalizationManager.Instance.GetTranslation("GameMode")
};
+ var positionreset = new MenuItem
+ {
+ Header = InternationalizationManager.Instance.GetTranslation("PositionReset")
+ };
var settings = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings")
@@ -237,12 +262,15 @@ namespace Flow.Launcher
open.Click += (o, e) => _viewModel.ToggleFlowLauncher();
gamemode.Click += (o, e) => ToggleGameMode();
+ positionreset.Click += (o, e) => PositionReset();
settings.Click += (o, e) => App.API.OpenSettingDialog();
exit.Click += (o, e) => Close();
contextMenu.Items.Add(header);
contextMenu.Items.Add(open);
gamemode.ToolTip = InternationalizationManager.Instance.GetTranslation("GameModeToolTip");
+ positionreset.ToolTip = InternationalizationManager.Instance.GetTranslation("PositionResetToolTip");
contextMenu.Items.Add(gamemode);
+ contextMenu.Items.Add(positionreset);
contextMenu.Items.Add(settings);
contextMenu.Items.Add(exit);
@@ -289,10 +317,17 @@ namespace Flow.Launcher
_viewModel.GameModeStatus = true;
}
}
+ private async void PositionReset()
+ {
+ _viewModel.Show();
+ await Task.Delay(300); // If don't give a time, Positioning will be weird.
+ Left = HorizonCenter();
+ Top = VerticalCenter();
+ }
private void InitProgressbarAnimation()
{
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 150,
- new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
+ new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
var da1 = new DoubleAnimation(ProgressBar.X1, ActualWidth + 50, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
Storyboard.SetTargetProperty(da, new PropertyPath("(Line.X2)"));
Storyboard.SetTargetProperty(da1, new PropertyPath("(Line.X1)"));
@@ -396,6 +431,8 @@ namespace Flow.Launcher
private async void OnDeactivated(object sender, EventArgs e)
{
+ _settings.WindowLeft = Left;
+ _settings.WindowTop = Top;
//This condition stops extra hide call when animator is on,
// which causes the toggling to occasional hide instead of show.
if (_viewModel.MainWindowVisibilityStatus)
@@ -417,24 +454,14 @@ namespace Flow.Launcher
{
if (_animating)
return;
-
- if (_settings.RememberLastLaunchLocation)
- {
- Left = _settings.WindowLeft;
- Top = _settings.WindowTop;
- }
- else
- {
- Left = WindowLeft();
- Top = WindowTop();
- }
+ InitializePosition();
}
private void OnLocationChanged(object sender, EventArgs e)
{
if (_animating)
return;
- if (_settings.RememberLastLaunchLocation)
+ if (_settings.SearchWindowPosition == SearchWindowPositions.RememberLastLaunchLocation)
{
_settings.WindowLeft = Left;
_settings.WindowTop = Top;
@@ -453,8 +480,8 @@ namespace Flow.Launcher
_viewModel.Show();
}
}
-
- public double WindowLeft()
+
+ public double HorizonCenter()
{
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
@@ -463,7 +490,7 @@ namespace Flow.Launcher
return left;
}
- public double WindowTop()
+ public double VerticalCenter()
{
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
@@ -472,12 +499,22 @@ namespace Flow.Launcher
return top;
}
+ public double HorizonRight()
+ {
+ var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
+ var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
+ var dip2 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.Width, 0);
+ var left = (dip2.X - ActualWidth) - 10;
+ return left;
+ }
+
///
/// Register up and down key
/// todo: any way to put this in xaml ?
///
private void OnKeyDown(object sender, KeyEventArgs e)
{
+ var specialKeyState = GlobalHotkey.CheckModifiers();
switch (e.Key)
{
case Key.Down:
@@ -512,8 +549,13 @@ namespace Flow.Launcher
e.Handled = true;
}
break;
+ case Key.F12:
+ if (specialKeyState.CtrlPressed)
+ {
+ ToggleGameMode();
+ }
+ break;
case Key.Back:
- var specialKeyState = GlobalHotkey.CheckModifiers();
if (specialKeyState.CtrlPressed)
{
if (_viewModel.SelectedIsFromQueryResults()
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index 9c9859946..b71321ee3 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -40,6 +40,8 @@
+
+
@@ -685,12 +687,25 @@
-
+
-
+
-
+
+
+
+
@@ -818,11 +833,13 @@
BorderThickness="0"
Style="{DynamicResource SettingGroupBox}">
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+ Background="#45BD59"
+ CornerRadius="36"
+ ToolTip="{DynamicResource LabelUpdateToolTip}"
+ Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" />
+ Text="{Binding Description, Mode=OneWay}" />
@@ -1665,25 +1691,45 @@
Foreground="{DynamicResource Color04B}"
NavigateUri="{Binding Website}"
RequestNavigate="OnRequestNavigate">
-
+
-
-
+ Orientation="Horizontal">
+
+
+
+
+
+
@@ -1815,6 +1861,7 @@
+
@@ -307,7 +311,7 @@ namespace Flow.Launcher.ViewModel
Notification.Show(
InternationalizationManager.Instance.GetTranslation("success"),
InternationalizationManager.Instance.GetTranslation("completedSuccessfully")
- );
+ );
}), TaskScheduler.Default)
.ConfigureAwait(false);
});
@@ -318,9 +322,9 @@ namespace Flow.Launcher.ViewModel
#region ViewModel Properties
public ResultsViewModel Results { get; private set; }
-
+
public ResultsViewModel ContextMenu { get; private set; }
-
+
public ResultsViewModel History { get; private set; }
public bool GameModeStatus { get; set; }
@@ -336,6 +340,55 @@ namespace Flow.Launcher.ViewModel
}
}
+
+ [RelayCommand]
+ private void IncreaseWidth()
+ {
+ if (MainWindowWidth + 100 > 1920 || _settings.WindowSize == 1920)
+ {
+ _settings.WindowSize = 1920;
+ }
+ else
+ {
+ _settings.WindowSize += 100;
+ _settings.WindowLeft -= 50;
+ }
+ OnPropertyChanged();
+ }
+
+ [RelayCommand]
+ private void DecreaseWidth()
+ {
+ if (MainWindowWidth - 100 < 400 || _settings.WindowSize == 400)
+ {
+ _settings.WindowSize = 400;
+ }
+ else
+ {
+ _settings.WindowLeft += 50;
+ _settings.WindowSize -= 100;
+ }
+ OnPropertyChanged();
+ }
+
+ [RelayCommand]
+ private void IncreaseMaxResult()
+ {
+ if (_settings.MaxResultsToShow == 17)
+ return;
+
+ _settings.MaxResultsToShow += 1;
+ }
+
+ [RelayCommand]
+ private void DecreaseMaxResult()
+ {
+ if (_settings.MaxResultsToShow == 2)
+ return;
+
+ _settings.MaxResultsToShow -= 1;
+ }
+
///
/// we need move cursor to end when we manually changed query
/// but we don't want to move cursor to end when query is updated from TextBox
@@ -411,7 +464,11 @@ namespace Flow.Launcher.ViewModel
public Visibility SearchIconVisibility { get; set; }
- public double MainWindowWidth => _settings.WindowSize;
+ public double MainWindowWidth
+ {
+ get => _settings.WindowSize;
+ set => _settings.WindowSize = value;
+ }
public string PluginIconPath { get; set; } = null;
@@ -592,7 +649,7 @@ namespace Flow.Launcher.ViewModel
PluginIconPath = null;
SearchIconVisibility = Visibility.Visible;
}
-
+
if (query.ActionKeyword == Plugin.Query.GlobalPluginWildcardSign)
{
@@ -903,18 +960,18 @@ namespace Flow.Launcher.ViewModel
Clipboard.SetFileDropList(paths);
App.API.ShowMsg(
- App.API.GetTranslation("copy")
- +" "
- + (isFile? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle")),
+ App.API.GetTranslation("copy")
+ + " "
+ + (isFile ? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle")),
App.API.GetTranslation("completedSuccessfully"));
}
else
{
Clipboard.SetDataObject(copyText.ToString());
App.API.ShowMsg(
- App.API.GetTranslation("copy")
- + " "
- + App.API.GetTranslation("textTitle"),
+ App.API.GetTranslation("copy")
+ + " "
+ + App.API.GetTranslation("textTitle"),
App.API.GetTranslation("completedSuccessfully"));
}
}
diff --git a/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
new file mode 100644
index 000000000..622e41b1b
--- /dev/null
+++ b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs
@@ -0,0 +1,58 @@
+using System;
+using Flow.Launcher.Core.ExternalPlugins;
+using Flow.Launcher.Core.Plugin;
+using Flow.Launcher.Plugin;
+
+namespace Flow.Launcher.ViewModel
+{
+ public class PluginStoreItemViewModel : BaseModel
+ {
+ public PluginStoreItemViewModel(UserPlugin plugin)
+ {
+ _plugin = plugin;
+ }
+
+ private UserPlugin _plugin;
+
+ public string ID => _plugin.ID;
+ public string Name => _plugin.Name;
+ public string Description => _plugin.Description;
+ public string Author => _plugin.Author;
+ public string Version => _plugin.Version;
+ public string Language => _plugin.Language;
+ public string Website => _plugin.Website;
+ public string UrlDownload => _plugin.UrlDownload;
+ public string UrlSourceCode => _plugin.UrlSourceCode;
+ public string IcoPath => _plugin.IcoPath;
+
+ public bool LabelInstalled => PluginManager.GetPluginForId(_plugin.ID) != null;
+ public bool LabelUpdate => LabelInstalled && _plugin.Version != PluginManager.GetPluginForId(_plugin.ID).Metadata.Version;
+
+ internal const string None = "None";
+ internal const string RecentlyUpdated = "RecentlyUpdated";
+ internal const string NewRelease = "NewRelease";
+ internal const string Installed = "Installed";
+
+ public string Category
+ {
+ get
+ {
+ string category = None;
+ if (DateTime.Now - _plugin.LatestReleaseDate < TimeSpan.FromDays(7))
+ {
+ category = RecentlyUpdated;
+ }
+ if (DateTime.Now - _plugin.DateAdded < TimeSpan.FromDays(7))
+ {
+ category = NewRelease;
+ }
+ if (PluginManager.GetPluginForId(_plugin.ID) != null)
+ {
+ category = Installed;
+ }
+
+ return category;
+ }
+ }
+ }
+}
diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
index 9e7ead7d0..192fee0f6 100644
--- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
+++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs
@@ -41,6 +41,9 @@ namespace Flow.Launcher.ViewModel
case nameof(Settings.ActivateTimes):
OnPropertyChanged(nameof(ActivatedTimes));
break;
+ case nameof(Settings.WindowSize):
+ OnPropertyChanged(nameof(WindowWidthSize));
+ break;
}
};
}
@@ -278,14 +281,24 @@ namespace Flow.Launcher.ViewModel
}
}
- public IList ExternalPlugins
+ public IList ExternalPlugins
{
get
{
- return PluginsManifest.UserPlugins;
+ return LabelMaker(PluginsManifest.UserPlugins);
}
}
+ private IList LabelMaker(IList list)
+ {
+ return list.Select(p=>new PluginStoreItemViewModel(p))
+ .OrderByDescending(p => p.Category == PluginStoreItemViewModel.NewRelease)
+ .ThenByDescending(p=>p.Category == PluginStoreItemViewModel.RecentlyUpdated)
+ .ThenByDescending(p => p.Category == PluginStoreItemViewModel.None)
+ .ThenByDescending(p => p.Category == PluginStoreItemViewModel.Installed)
+ .ToList();
+ }
+
public Control SettingProvider
{
get
@@ -311,6 +324,15 @@ namespace Flow.Launcher.ViewModel
OnPropertyChanged(nameof(ExternalPlugins));
}
+ internal void DisplayPluginQuery(string queryToDisplay, PluginPair plugin, int actionKeywordPosition = 0)
+ {
+ var actionKeyword = plugin.Metadata.ActionKeywords.Count == 0
+ ? string.Empty
+ : plugin.Metadata.ActionKeywords[actionKeywordPosition];
+
+ App.API.ChangeQuery($"{actionKeyword} {queryToDisplay}");
+ App.API.ShowMainWindow();
+ }
#endregion
@@ -382,6 +404,33 @@ namespace Flow.Launcher.ViewModel
}
}
+
+
+ public class SearchWindowPosition
+ {
+ public string Display { get; set; }
+ public SearchWindowPositions Value { get; set; }
+ }
+
+ public List SearchWindowPositions
+ {
+ get
+ {
+ List modes = new List();
+ var enums = (SearchWindowPositions[])Enum.GetValues(typeof(SearchWindowPositions));
+ foreach (var e in enums)
+ {
+ var key = $"SearchWindowPosition{e}";
+ var display = _translater.GetTranslation(key);
+ var m = new SearchWindowPosition { Display = display, Value = e, };
+ modes.Add(m);
+ }
+ return modes;
+ }
+ }
+
+
+
public double WindowWidthSize
{
get => Settings.WindowSize;
diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj
index 0fe809926..e65e7d497 100644
--- a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj
+++ b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj
@@ -62,7 +62,7 @@
-
+
\ No newline at end of file
diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Images/ControlPanel_Small.png b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Images/ControlPanel_Small.png
index 8a8a41aeb..0897fd788 100644
Binary files a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Images/ControlPanel_Small.png and b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Images/ControlPanel_Small.png differ
diff --git a/global.json b/global.json
index 5e94f4b05..6ff5b35d3 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "6.0.100",
- "rollForward": "latestFeature"
+ "version": "6.0.*",
+ "rollForward": "latestPatch"
}
}
\ No newline at end of file