Skip to content
Commit c046e22e authored by Alex Miranda's avatar Alex Miranda Committed by Nate Graham
Browse files

Remove extra pixel when cropping with an aspect ratio

Summary:
This fixes a bug where using the crop tool and resizing the crop
area by adjusting the top left or top right corners with a fixed
aspect ratio will make the crop area's height a pixel higher than
expected. This is because QRect::bottom() doesn't return the
exact y coordinate.

From Qt Documentation: https://doc.qt.io/qt-5/qrect.html#bottom

Test Plan:
1. Use the crop tool with a 1:1 aspect ratio
2. Change the crop area by adjusting the top left and top right corners
3. Verify both width and height have the same value

Reviewers: #gwenview, ngraham

Reviewed By: #gwenview, ngraham

Subscribers: anthonyfieroni

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D24290
parent 1a2623d9
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