diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 66cc911ee87..813a44527be 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/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 2019c1b6629..824201f7d66 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -41,6 +41,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 @@ -131,6 +132,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/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index dc3b3f1454b..cc605edc90b 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -32,7 +32,9 @@ Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" WindowStartupLocation="Manual" WindowStyle="None" - mc:Ignorable="d"> + mc:Ignorable="d" + Left="{Binding Left, Mode=TwoWay}" + Top="{Binding Top, Mode=TwoWay}"> @@ -84,6 +86,22 @@ Modifiers="Ctrl" /> + + + + private void OnKeyDown(object sender, KeyEventArgs e) { + var specialKeyState = GlobalHotkey.CheckModifiers(); switch (e.Key) { case Key.Down: @@ -512,8 +508,13 @@ private void OnKeyDown(object sender, KeyEventArgs e) 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 0a63b3a6cfb..3e8a4f0a118 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -818,11 +818,13 @@ BorderThickness="0" Style="{DynamicResource SettingGroupBox}"> - + + + + + @@ -307,7 +311,7 @@ private void InitializeKeyCommands() Notification.Show( InternationalizationManager.Instance.GetTranslation("success"), InternationalizationManager.Instance.GetTranslation("completedSuccessfully") - ); + ); }), TaskScheduler.Default) .ConfigureAwait(false); }); @@ -318,9 +322,9 @@ private void InitializeKeyCommands() #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,74 @@ public string QueryText } } + + public double Top + { + get => _settings.WindowTop; + set + { + _settings.WindowTop = value; + OnPropertyChanged(); + } + } + public double Left + { + get => _settings.WindowLeft; + set + { + _settings.WindowLeft = value; + OnPropertyChanged(); + } + } + + [RelayCommand] + private void IncreaseWidth() + { + if (MainWindowWidth + 100 > 1920 || _settings.WindowSize == 1920) + { + _settings.WindowSize = 1920; + } + else + { + _settings.WindowSize += 100; + Left -= 50; + } + OnPropertyChanged(); + } + + [RelayCommand] + private void DecreaseWidth() + { + if (MainWindowWidth - 100 < 400 || _settings.WindowSize == 400) + { + _settings.WindowSize = 400; + } + else + { + Left += 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 +483,11 @@ private ResultsViewModel SelectedResults 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 +668,7 @@ private async void QueryResults() PluginIconPath = null; SearchIconVisibility = Visibility.Visible; } - + if (query.ActionKeyword == Plugin.Query.GlobalPluginWildcardSign) { @@ -903,18 +979,18 @@ public void ResultCopy(string stringToCopy) 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/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index 9e7ead7d07c..24a1fd78217 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -41,6 +41,9 @@ public SettingWindowViewModel(Updater updater, IPortable portable) case nameof(Settings.ActivateTimes): OnPropertyChanged(nameof(ActivatedTimes)); break; + case nameof(Settings.WindowSize): + OnPropertyChanged(nameof(WindowWidthSize)); + break; } }; } diff --git a/global.json b/global.json index 5e94f4b05ba..6ff5b35d3d8 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