On an image reduced to fit on my screen, middle-clicking on it will switch the zoom ratio to 100%, and vice-versa if I middle-click once more. However, the zoom is not centered on where I clicked: it's merely centered on the center of the picture. It's not the case when I Ctrl+Scroll-Up: the zoom is centered on the mouse position, which is nice. Reproducible: Always Steps to Reproduce: 1. Open a big picture and have it reduced to fit your screen; 2. Move your mouse to some point of interest on one of the edges (not in the center) of the picture; 3. Middle-click there; Actual Results: You get the center of the image shown at 100%, not the point of interest you were targeting. You have to click-and-move to go there. Expected Results: The point of interest targeted by the middle-click should have been centered and shown at 100%, not the center of the picture.
Git commit 1e66de8f8f2664451279b23f2e6e7cef3ba372bc by Peter Mühlenpfordt. Committed on 15/03/2018 at 13:45. Pushed by muhlenpfordt into branch 'master'. Keep click position in focus on middle-click zoom Summary: Clicking on an image in View Mode with the middle mouse button toggles between `Fit` and `100%` zoom modes. The image zoomed to `100%` is always scrolled to the image center. This patch keeps the clicked location in focus as it is done while zooming with {key Ctrl Scroll}. Test Plan: * Open a big image in View Mode * Middle-click on different locations over the image * The `100%` zoom view should keep the clicked location in focus Reviewers: #gwenview, rkflx Reviewed By: #gwenview, rkflx Subscribers: rkflx, huoni Differential Revision: https://phabricator.kde.org/D11336 M +1 -1 lib/documentview/abstractimageview.cpp https://commits.kde.org/gwenview/1e66de8f8f2664451279b23f2e6e7cef3ba372bc