mirror of https://github.com/procxx/kepka.git
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) {
|
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) {
|
if (hasStackHistory() || wrap() != Wrap::Layer) {
|
||||||
checkBeforeClose([=] { _controller->showBackFromStack(); });
|
checkBeforeClose([=] { _controller->showBackFromStack(); });
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -573,11 +573,13 @@ void Widget::updateControlsGeometry() {
|
||||||
void Widget::keyPressEvent(QKeyEvent *e) {
|
void Widget::keyPressEvent(QKeyEvent *e) {
|
||||||
if (_a_show.animating() || getStep()->animating()) return;
|
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()) {
|
if (getStep()->hasBack()) {
|
||||||
historyMove(Direction::Back);
|
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();
|
getStep()->submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue