Skip to content

Commit

Permalink
More hotkeys to zoom images in viewer: Plus, Minus and Asterisk witho…
Browse files Browse the repository at this point in the history
…ut Ctrl key; alias Enter and Space to reset zoom level for simple photos
  • Loading branch information
aleksusklim committed May 10, 2021
1 parent 4259e90 commit c45dc79
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3631,6 +3631,8 @@ void OverlayWidget::keyPressEvent(QKeyEvent *e) {
playbackPauseResume();
} else if (_document && !_document->loading() && (documentBubbleShown() || !_documentMedia->loaded())) {
onDocClick();
} else {
zoomReset();
}
} else if (e->key() == Qt::Key_Left) {
if (_controlsHideTimer.isActive()) {
Expand All @@ -3652,6 +3654,12 @@ void OverlayWidget::keyPressEvent(QKeyEvent *e) {
} else if (e->key() == Qt::Key_I) {
update();
}
} else if (e->key() == Qt::Key_Plus) {
zoomIn();
} else if (e->key() == Qt::Key_Minus) {
zoomOut();
} else if (e->key() == Qt::Key_Asterisk) {
zoomReset();
}
}

Expand Down

0 comments on commit c45dc79

Please sign in to comment.