Bug 421484 - Center viewport at mouse position during Ctrl-scroll zoom
Summary: Center viewport at mouse position during Ctrl-scroll zoom
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-13 21:54 UTC by Nicolas Dietrich
Modified: 2024-07-06 02:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.08.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Dietrich 2020-05-13 21:54:31 UTC
Some tools (e.g. gimp or web maps) set the center of the zoom operation to the mouse pointer when the zoom is triggered by a (ctrl+) mouse-scroll. This is very convenient as it allows you to make sure to keep something in view when zooming in.

Okular currently doesn't do this, but always zooms into/out of the center of the current view (which is fine for ctrl-+ / ctrl--).

It'd be great if this could be implemented - thanks for considering :)


(Evince seems to do this, this is the corresponding bug report: https://gitlab.gnome.org/GNOME/evince/-/issues/11)
Comment 1 Oliver Sander 2020-05-14 05:50:14 UTC
Can you confirm that

  https://invent.kde.org/kde/okular/-/merge_requests/134

is what you want?
Comment 2 Nicolas Dietrich 2020-05-14 10:28:21 UTC
Yes, this is what I want, great! (though I haven't tried / built it)
Comment 3 Bug Janitor Service 2024-01-14 15:43:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/912
Comment 4 Sune Vuorela 2024-07-03 18:31:43 UTC
Git commit 3e10990eb00ad8ba6f996af74bd7a52d78568ea5 by Sune Vuorela, on behalf of Alexis Murzeau.
Committed on 03/07/2024 at 18:21.
Pushed by sune into branch 'master'.

When doing Ctrl+Wheel, zoom on pointer instead of the center of the screen

The zoom is implemented using zoomWithFixedCenter so it zooms into the
current mouse pointer location instead of zooming on the viewport center.

M  +21   -1    part/pageview.cpp

https://invent.kde.org/graphics/okular/-/commit/3e10990eb00ad8ba6f996af74bd7a52d78568ea5