mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PowerToys Run] Implemented Setting to Clear Search Query when PowerToys Run is Launched (#4995)
* Implemented Clear Input On Launch * Move logic to seperate command on viewmodel * Added Settings Sync Moved logic from OnDeactivated to OnActivated * Complete after testing Co-authored-by: Roy <royvou@hotmailcom>
This commit is contained in:
@@ -151,9 +151,17 @@ namespace PowerLauncher
|
||||
_settings.WindowLeft = Left;
|
||||
}
|
||||
|
||||
private void OnActivated(object sender, EventArgs e)
|
||||
{
|
||||
if (_settings.ClearInputOnLaunch)
|
||||
{
|
||||
_viewModel.ClearQueryCommand.Execute(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDeactivated(object sender, EventArgs e)
|
||||
{
|
||||
if (_settings.HideWhenDeactivated)
|
||||
if (_settings.HideWhenDeactivated)
|
||||
{
|
||||
//(this.FindResource("OutroStoryboard") as Storyboard).Begin();
|
||||
Hide();
|
||||
|
||||
Reference in New Issue
Block a user