mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Close languages box by Escape key.
This commit is contained in:
@@ -1070,6 +1070,10 @@ void LanguageBox::prepare() {
|
|||||||
|
|
||||||
void LanguageBox::keyPressEvent(QKeyEvent *e) {
|
void LanguageBox::keyPressEvent(QKeyEvent *e) {
|
||||||
const auto key = e->key();
|
const auto key = e->key();
|
||||||
|
if (key == Qt::Key_Escape) {
|
||||||
|
closeBox();
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto selected = [&] {
|
const auto selected = [&] {
|
||||||
if (key == Qt::Key_Up) {
|
if (key == Qt::Key_Up) {
|
||||||
return _jump(-1);
|
return _jump(-1);
|
||||||
|
Reference in New Issue
Block a user