[PTRun]Add option to tab through results only (#22965)

* Added option to tab through results directly instead of context menu options

With reference to #22964

* Move setting to search results group
This commit is contained in:
Aditya Goturu
2023-01-10 19:34:50 +05:30
committed by GitHub
parent 9baaaefc5f
commit 25e9241d42
8 changed files with 76 additions and 8 deletions

View File

@@ -150,6 +150,11 @@ namespace PowerLauncher
_settings.ClearInputOnLaunch = overloadSettings.Properties.ClearInputOnLaunch;
}
if (_settings.TabSelectsContextButtons != overloadSettings.Properties.TabSelectsContextButtons)
{
_settings.TabSelectsContextButtons = overloadSettings.Properties.TabSelectsContextButtons;
}
if (_settings.Theme != overloadSettings.Properties.Theme)
{
_settings.Theme = overloadSettings.Properties.Theme;

View File

@@ -186,21 +186,45 @@ namespace PowerLauncher.ViewModel
public void SelectNextTabItem()
{
// Do nothing if there is no selected item or we've selected the next context button
if (!SelectedItem?.SelectNextContextButton() ?? true)
if (_settings.TabSelectsContextButtons)
{
SelectNextResult();
// Do nothing if there is no selected item or we've selected the next context button
if (!SelectedItem?.SelectNextContextButton() ?? true)
{
SelectNextResult();
}
}
else
{
// Do nothing if there is no selected item
if (SelectedItem != null)
{
SelectNextResult();
}
}
}
public void SelectPrevTabItem()
{
// Do nothing if there is no selected item or we've selected the previous context button
if (!SelectedItem?.SelectPrevContextButton() ?? true)
if (_settings.TabSelectsContextButtons)
{
// Tabbing backwards should highlight the last item of the previous row
SelectPrevResult();
SelectedItem?.SelectLastContextButton();
// Do nothing if there is no selected item or we've selected the previous context button
if (!SelectedItem?.SelectPrevContextButton() ?? true)
{
// Tabbing backwards should highlight the last item of the previous row
SelectPrevResult();
SelectedItem?.SelectLastContextButton();
}
}
else
{
// Do nothing if there is no selected item
if (SelectedItem != null)
{
// Tabbing backwards should highlight the last item of the previous row
SelectPrevResult();
SelectedItem?.SelectLastContextButton();
}
}
}

View File

@@ -315,6 +315,8 @@ namespace Wox.Infrastructure.UserSettings
public bool ClearInputOnLaunch { get; set; }
public bool TabSelectsContextButtons { get; set; }
public bool RememberLastLaunchLocation { get; set; }
public bool IgnoreHotkeysOnFullscreen { get; set; }