Close app preset menu when main window loses focus

This commit is contained in:
Raphire
2026-03-17 21:28:35 +01:00
parent 1b41f05743
commit 7a3431e56b

View File

@@ -919,6 +919,11 @@ function Show-MainWindow {
}
})
# Close the preset menu when the main window loses focus (e.g., user switches to another app).
$window.Add_Deactivated({
if ($presetsPopup.IsOpen) { $presetsPopup.IsOpen = $false }
})
# Toggle popup on button click
$presetsBtn.Add_Click({
$presetsPopup.IsOpen = -not $presetsPopup.IsOpen