mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
feature<PopupPanel>: add hotkey ESC to close current popup panel
This commit is contained in:
parent
b134876f8b
commit
468d0e6f25
5 changed files with 20 additions and 0 deletions
|
@ -170,6 +170,19 @@ namespace SourceGit.Views {
|
|||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Keyboard.IsKeyDown(Key.Escape)) {
|
||||
var page = container.Get(tabs.Current);
|
||||
|
||||
var popup = null as Widgets.PopupPanel;
|
||||
if (page is Widgets.Dashboard) {
|
||||
popup = (page as Widgets.Dashboard).popup;
|
||||
} else if (page is Widgets.Welcome) {
|
||||
popup = (page as Widgets.Welcome).popup;
|
||||
}
|
||||
|
||||
popup?.CancelDirectly();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue