mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Close payments panel by escape.
This commit is contained in:
parent
b1c122a260
commit
d55d7f37d7
1 changed files with 8 additions and 2 deletions
|
@ -129,8 +129,14 @@ void SeparatePanel::showAndActivate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SeparatePanel::keyPressEvent(QKeyEvent *e) {
|
void SeparatePanel::keyPressEvent(QKeyEvent *e) {
|
||||||
if (e->key() == Qt::Key_Escape && _back->toggled()) {
|
if (e->key() == Qt::Key_Escape) {
|
||||||
_synteticBackRequests.fire({});
|
crl::on_main(this, [=] {
|
||||||
|
if (_back->toggled()) {
|
||||||
|
_synteticBackRequests.fire({});
|
||||||
|
} else {
|
||||||
|
_userCloseRequests.fire({});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return RpWidget::keyPressEvent(e);
|
return RpWidget::keyPressEvent(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue