Keep the width of the crop spinboxes fixed to avoid wiggling
Summary:
When moving the Crop handles with the mouse, the UI of the bottom
toolbar jumps around which does not look very professional.
This is due to Qt adapting the width of the spinboxes to their maximum
value (so numbers with more digits still fit without being cut off),
which obviously changes depending on what the user selected to crop. For
example, initially the crop size is equal to the image size, so the
maximum displacement is 0 in both directions. Making the crop rectangle
smaller will subsequently increase the number of digits needed in the
position spinboxes.
The issue can be fixed by setting the minimum width to the maximum width
possible during initialization instead of increasing it dynamically via
Qt, effectively enforcing a fixed size.
FIXED-IN: 18.08.1
Test Plan:
Activate Crop and check Advanced Settings. Moving the
top-left crop handle to the bottom-right should not result in any
movement in the UI of the crop toolbar anymore, since the spinboxes are
now fixed in width.
Reviewers: Gwenview, muhlenpfordt
Reviewed By: Gwenview, muhlenpfordt
Differential Revision: https://phabricator.kde.org/D14888