Center zoom to cursor position for zoom In/Out, Fill and 100% actions

Authored by muhlenpfordt on Jul 17 2018, 9:15 AM.

Description

Center zoom to cursor position for zoom In/Out, Fill and 100% actions

Summary:
Zooming by mouse click/wheel and shortcut toggling from Fit/
Fill to 100% already centers the zoom to the current
cursor position.
This patch also centers the zoom on the cursor position for:

  • triggering Fill zoom ( middle click/+F)
  • shortcut zooming in/out (Ctrl++/Ctrl+-)
  • shortcut zooming to 100% (if Actual Size shortcut set)

Test Plan:

  • Try different zoom actions by mouse/shortcut
  • Check if zoom centers to current cursor position (inside image view)
  • Check compare mode

Reviewers: Gwenview, rkflx

Reviewed By: Gwenview, rkflx

Subscribers: rkflx

Differential Revision: https://phabricator.kde.org/D14181

Details