mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-24 20:33:19 +00:00
Back mouse button and key return you in stack.
Now you can use mouse Back button and Back keyboard button to return from media overview through profile to the chat view.
This commit is contained in:
parent
0518a456f8
commit
bb7730eee1
@ -3067,6 +3067,11 @@ bool MainWidget::eventFilter(QObject *o, QEvent *e) {
|
||||
Global::RefDialogsListFocused().set(true, false);
|
||||
}
|
||||
}
|
||||
} else if (e->type() == QEvent::MouseButtonPress) {
|
||||
if (static_cast<QMouseEvent*>(e)->button() == Qt::BackButton) {
|
||||
showBackFromStack();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return TWidget::eventFilter(o, e);
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||
}
|
||||
|
||||
void InnerWidget::keyPressEvent(QKeyEvent *e) {
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Back) {
|
||||
emit cancelled();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user