fix hiding of popups on escape

This commit is contained in:
Drew Weymouth
2023-03-03 20:51:04 -08:00
parent 37928881c0
commit a8ea12feaf
13 changed files with 59 additions and 55 deletions
+7 -1
View File
@@ -141,7 +141,13 @@ func (m *MainWindow) addShortcuts() {
}
m.Canvas().SetOnTypedKey(func(e *fyne.KeyEvent) {
if e.Name == fyne.KeySpace {
switch e.Name {
case fyne.KeyEscape:
if m.Controller.EscapablePopUp != nil {
m.Controller.EscapablePopUp.Hide()
m.Controller.EscapablePopUp = nil
}
case fyne.KeySpace:
m.App.Player.PlayPause()
}
})