For the Crop operation in Gwenview one can set a image ratio (ie. 3:2, 4:5, etc). However when this is set several things do not work: 1. It is not possible to scroll increase the size, ie. hover with the mouse over a size field and scroll up -> nothing happens (scroll down works). 2. It is not possible to enter custom values in the size field, instead they are rounded on input, which isn't helpful at all. For instance set ratio to 3:2 and try to enter 555 in the width field: It will always be rendered to 333, although 555:370 would be a valid 3:2 ratio. Reproducible: Always
This is definitely still a problem. One solution would be to only round/calculate when leaving the field, rather than every time the value is changed.
*** Bug 394714 has been marked as a duplicate of this bug. ***
For info, there's no need to select a custom ratio; any of the predefined ratios has the same problem. I think what is happening is that when one makes a change in one of the fields, the other one is computed based on the aspect ratio, and because that one was changed, it propagates back to the first one. Based on Huon's comment, I found the culprit 2 lines: https://bugs.kde.org/show_bug.cgi?id=332208 I wish I had more time to pour on this, sounds like a very easy change.
Wrong link?
Ooops: https://cgit.kde.org/gwenview.git/tree/lib/crop/cropwidget.cpp#n278
If the easy change you are referring to is about simply deleting those lines, then I'm afraid it would break updating the canvas in reaction to spinning the value up and down. Perhaps we might need something more complicated like "mUpdateFrom*" as found in "resizeimagedialog.cpp".
No, I think they need to connect another signal, like what Huon said here: https://bugs.kde.org/show_bug.cgi?id=332208#c1
(In reply to Marcos Dione from comment #7) > No, I think they need to connect another signal, like what Huon said here: > > https://bugs.kde.org/show_bug.cgi?id=332208#c1 That was a high level thought I had at the time. I now think copying the logic in the resize dialog is better, in order to keep the update-as-you-type behaviour, which IMO is better UX.
Git commit 31ac40afbc8c2206556ade5a2c025605bf307a87 by Nate Graham, on behalf of Alban Boissard. Committed on 12/05/2022 at 14:43. Pushed by ngraham into branch 'master'. Make spinboxes in Crop tool behave properly with fixed aspect ratio When the aspect ratio is fixed in the crop tool, if we change the value of a spinbox, the other spinbox is set accordingly but trigger a signal that change the value of the first spinbox. This commit fixes that wrong behavior. FIXED-IN: 22.08 Signed-off-by: Alban Boissard <albanboissard@gmail.com> M +10 -2 lib/crop/cropwidget.cpp https://invent.kde.org/graphics/gwenview/commit/31ac40afbc8c2206556ade5a2c025605bf307a87
Looks good! Thanks for your time :)