Skip to content
  • Huon Imberger's avatar
    Lock crop ratio to current rect when holding Ctrl/Shift · ef8bfd40
    Huon Imberger authored
    Summary:
    In many graphics apps, holding Ctrl and/or Shift locks the ratio of
    the rectangle being resized, making it quicker than manually choosing
    a ratio. This patch adds this functionality to the Crop tool.
    
    When Ctrl or Shift is pressed, the current ratio of the crop rect
    is saved, "locking it". When resizing, so long as Ctrl or Shift is
    pressed, the ratio is enforced to this locked value. Otherwise it
    behaves the same as before - enforcing ratio if one was chosen in
    the GUI
    
    Depends on D11379
    
    Test Plan:
      - Crop tool behaves normally when Ctrl/Shift not pressed
      - Crop ratio locked when Ctrl/Shift is pressed
      - Ctrl/Shift has no effect if ratio is already restricted
        by the {nav Basic} toggle or {nav Advanced} combobox
    
    Reviewers: #gwenview, rkflx
    
    Reviewed By: #gwenview, rkflx
    
    Differential Revision: https://phabricator.kde.org/D11380
    ef8bfd40