mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Double click to close editor (#11098)
Co-authored-by: Niels Laute <niels9001@hotmail.com>
This commit is contained in:
@@ -60,14 +60,24 @@ namespace FancyZonesEditor
|
||||
{
|
||||
if (e.Key == Key.Escape)
|
||||
{
|
||||
if (_openedDialog != null)
|
||||
{
|
||||
_openedDialog.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
OnClosing(sender, null);
|
||||
}
|
||||
CloseDialog(sender);
|
||||
}
|
||||
}
|
||||
|
||||
private void LayoutItem_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
CloseDialog(sender);
|
||||
}
|
||||
|
||||
private void CloseDialog(object sender)
|
||||
{
|
||||
if (_openedDialog != null)
|
||||
{
|
||||
_openedDialog.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
OnClosing(sender, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user