mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Close payments panel by escape.
This commit is contained in:
@@ -129,8 +129,14 @@ void SeparatePanel::showAndActivate() {
|
||||
}
|
||||
|
||||
void SeparatePanel::keyPressEvent(QKeyEvent *e) {
|
||||
if (e->key() == Qt::Key_Escape && _back->toggled()) {
|
||||
_synteticBackRequests.fire({});
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
crl::on_main(this, [=] {
|
||||
if (_back->toggled()) {
|
||||
_synteticBackRequests.fire({});
|
||||
} else {
|
||||
_userCloseRequests.fire({});
|
||||
}
|
||||
});
|
||||
}
|
||||
return RpWidget::keyPressEvent(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user