Skip to content
Commit ef8bfd40 authored by Huon Imberger's avatar Huon Imberger
Browse files

Lock crop ratio to current rect when holding Ctrl/Shift

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
parent 0cf3b3d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment