mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 12:00:48 +00:00
Move back by Back key in Intro / Info / Settings.
This commit is contained in:
parent
fdfc767930
commit
352fc55234
@ -971,7 +971,7 @@ void WrapWidget::resizeEvent(QResizeEvent *e) {
|
||||
}
|
||||
|
||||
void WrapWidget::keyPressEvent(QKeyEvent *e) {
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Back) {
|
||||
if (hasStackHistory() || wrap() != Wrap::Layer) {
|
||||
checkBeforeClose([=] { _controller->showBackFromStack(); });
|
||||
return;
|
||||
|
@ -573,11 +573,13 @@ void Widget::updateControlsGeometry() {
|
||||
void Widget::keyPressEvent(QKeyEvent *e) {
|
||||
if (_a_show.animating() || getStep()->animating()) return;
|
||||
|
||||
if (e->key() == Qt::Key_Escape) {
|
||||
if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Back) {
|
||||
if (getStep()->hasBack()) {
|
||||
historyMove(Direction::Back);
|
||||
}
|
||||
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return || e->key() == Qt::Key_Space) {
|
||||
} else if (e->key() == Qt::Key_Enter
|
||||
|| e->key() == Qt::Key_Return
|
||||
|| e->key() == Qt::Key_Space) {
|
||||
getStep()->submit();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user