Toggle between zoom options "Fit"/"Fill" and "100%" on multiple activation

Authored by muhlenpfordt on Jul 13 2018, 8:43 AM.

Description

Toggle between zoom options "Fit"/"Fill" and "100%" on multiple activation

Summary:
In previous versions of Gwenview it was possible to toggle between
Fit and 100% zoom factors using the shortcut F.
After 3e10699ac37c added the Fit Width zoom option this feature
did not work any more.
This patch adds toggling for both Fit and Fill zoom
options if the shortcut F or one of the buttons is pressed
multiple times. Zooming to 100% is centered to the current cursor
position like middle click works.

BUG: 396360

Test Plan:

  1. Open Gwenview in View Mode
  2. Use zoom buttons Fit/Fill or F multiple times
  3. The zoom should toggle between Fit and 100%, respectively between Fill and 100%

Reviewers: Gwenview, rkflx

Reviewed By: Gwenview, rkflx

Subscribers: rkflx

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

Details