Fixed viewer list not being closable with the escape key (#3734)

This commit is contained in:
xel86
2022-05-14 07:44:18 -04:00
committed by GitHub
parent 46a5c9509e
commit 1bf31889f9
2 changed files with 22 additions and 0 deletions
+21
View File
@@ -1067,6 +1067,27 @@ void Split::showViewerList()
listDoubleClick(resultList->currentItem()->text());
});
HotkeyController::HotkeyMap actions{
{"delete",
[viewerDock](std::vector<QString>) -> QString {
viewerDock->close();
return "";
}},
{"accept", nullptr},
{"reject", nullptr},
{"scrollPage", nullptr},
{"openTab", nullptr},
{"search",
[searchBar](std::vector<QString>) -> QString {
searchBar->setFocus();
searchBar->selectAll();
return "";
}},
};
getApp()->hotkeys->shortcutsForCategory(HotkeyCategory::PopupWindow,
actions, viewerDock);
dockVbox->addWidget(searchBar);
dockVbox->addWidget(loadingLabel);
dockVbox->addWidget(chattersList);