Skip to content
  • Peter Mühlenpfordt's avatar
    Toggle between zoom options "Fit"/"Fill" and "100%" on multiple activation · 945c8a7a
    Peter Mühlenpfordt authored
    Summary:
    In previous versions of Gwenview it was possible to toggle between
    {nav Fit} and {nav 100%} zoom factors using the shortcut {key F}.
    After 3e10699a added the {nav Fit Width} zoom option this feature
    did not work any more.
    This patch adds toggling for both {nav Fit} and {nav Fill} zoom
    options if the shortcut {key 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:
    # Open Gwenview in View Mode
    # Use zoom buttons {nav Fit}/{nav Fill} or {key F} multiple times
    # The zoom should toggle between {nav Fit} and {nav 100%},
      respectively between {nav Fill} and {nav 100%}
    
    Reviewers: #gwenview, rkflx
    
    Reviewed By: #gwenview, rkflx
    
    Subscribers: rkflx
    
    Differential Revision: https://phabricator.kde.org/D14093
    945c8a7a