After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 355545 - fixing the aspect ratio for crop tool
fixing the aspect ratio for crop tool
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.3.x
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
: 452787 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-12 07:42 UTC by Jeffery Small
Modified: 2008-01-15 14:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Gimp-Crop-Tool-Keep-Aspect-draft-1.patch (10.28 KB, patch)
2007-07-11 04:58 UTC, Martin Nordholts
rejected Details | Review

Description Jeffery Small 2006-09-12 07:42:46 UTC
Holding Shift used to allow the crop rectangle to be resized from the corners while maintaining the same aspect ratio.  This no longer works.  Pressing Shift simply toggles the Make Square option.  Please add a keyboard accellerator back that provides this old functionality.

Also, while setting the crop area, the width and height of the rectangle are displayed on the message line.  Please add the aspect ratio to this report (which used to be on the old crop/resize dialog) so that the user can gauge the proportions.
Comment 1 Sven Neumann 2006-09-12 07:48:37 UTC
The new tools are still under construction and subject to changes.
Comment 2 Sven Neumann 2006-09-13 10:26:36 UTC
Not sure how to best solve this. Surely using a modifier to maintain the aspect ratio makes some sense for the crop tool but probably also for the other rectangle tools (rect-select and ellipse-select).

This should at least be looked at for 2.4.
Comment 3 Jeffery Small 2006-09-13 16:45:24 UTC
I'm confused.  Why does this have to be "solved"?  It already works this way in gimp 2.2 and is functionality that was lost in 2.3.  Why can't this important feature simply be reinstated?  In 2.3 pressing the Shift key now toggles the "Make square" option which it did not used to do, and Ctrl toggles the "Expand from center" option.  I don't mind tools evolving and getting new capabilities, but I don't like it when we lose a feature we have relied upon for some time.  I do agree that there should be consistency between various tools with similar operations.  I suggest that holding Shift remain as the modifier that forces the the rectangle to maintain its aspect ratio while being dragged (since this is current functionality) and that Alt be made the toggle for the "Make square" option.

PS: I'm not too wacky about this idea of using Ctrl, Shift or Alt as toggles.  You expect these keys to be command modifiers only when held down doring an operation and I find that using them as regular keys is very unintuitive.  I would suggest that something else be assigned for option toggling - possibly the function keys.
Comment 4 Sven Neumann 2006-09-14 09:01:51 UTC
Jeffery, the tool has been recreated from scratch and it now shares a lot of code with the rectangle and ellipse select tools. This is good because it gives a more consistent user experience. But we might want to consider tweaking things a bit for the Crop tool because fixing the aspect ratio is more important here than it is for the selection tools.

Regarding your postscript, the modifier keys are not used as regular keys.
Comment 5 Jeffery Small 2006-09-14 19:21:41 UTC
The modifier keys are being used to permanently toggle features and this is what I mean as being used like regular keys.  Historical consistency with gimp and with most other programs would dictate that these "modifier" keys only modify a tool's behavior so long as they were being pressed.  When these keys are released, the tool should revert to the previous mode of operation.  For example, on the crop tool,holding down the Ctrl key while dragging the rectangle could activate/deactivate the "Expand from center" feature (depending on the current checkmark status), but as soon as Ctrl was released the tool should revert to the previous mode.  For historical consistency, I think holding Shift should be reassigned to toggling the Aspect ratio lock while holding Alt could be assigned to the "Make square" option (in place of Shift).

Also, I don't see any problem using the same Shift/Alt/Ctrl assignments I describe above for the rectangular and ellipse selection tools.  These all seem like they could be potentially useful and certainly do not need to be used if the user finds them non-applicable to their situation.
Comment 6 Michael Natterer 2006-09-14 20:21:50 UTC
You are merely describing symptoms of bugs, and some of these bugs are
already fixed in CVS. If you are so interested in stuff that is labeled
as "unstable", get the latest CVS and update regularly, so you get the
fixes as they are committed. Also, IRC works much better than Bugzilla
for stuff that is under heavy development and thus subject to constant
change.
Comment 7 Jeffery Small 2006-09-14 21:57:47 UTC
Hey, please don't get mad.  I'm just trying to provide some useful user interface design feedback for the development team before these things become locked in as new features of the final release.  I'm not trying to start an argument or be overly critical.  I really appreciate all the hard work that has been done in the past and is currently being done to make gimp such a great tool.  These are just my thoughts on what I believe would be useful improvements.  If you don't find my observations convincing, then I'm sure you will ignore them.  In any case, I think I've made my point so I don't need to press it further.  Regards.
Comment 8 Sven Neumann 2006-09-17 13:12:54 UTC
Jeffery, your comments were based on false assumptions. You are working with a development version; thus things are broken. Don't assume that we are intentionally breaking with common sense. And don't be surprised that people get upset if you tell them that they are.
Comment 9 Sven Neumann 2007-07-03 11:02:17 UTC
*** Bug 452787 has been marked as a duplicate of this bug. ***
Comment 10 Martin Nordholts 2007-07-08 22:45:11 UTC
How about adding the tool option 'Keep aspect ratio' to the Crop tool options, just as it is in 2.2?

Toggling Shift before pressing the mouse would toggle this option (as in 2.2), and toggling Shift while dragging would toggle 'Fixed aspect ratio'.
Comment 11 Martin Nordholts 2007-07-11 04:58:29 UTC
Created attachment 91593 [details] [review]
Gimp-Crop-Tool-Keep-Aspect-draft-1.patch

This adds a 'Keep aspect ratio' option in the Crop Tool Options, and binds Alt (GDK_MOD1_MASK) to toggle it.

Works well, but the evil thing about it is that it adds text; _("Keep aspect ratio"). I don't see how we can possibly sanely fix this without adding that text though.

What is also quite evil is that it changes the Keep aspect-key from Shift (2.2) to Alt. We should ask guiguru about the severeness of this.

Not finnished:

 * For some reason you can only use Alt when you are working on a crop
   rectangle. 

 * The rectangle is not immediately updated when you press Alt.

Any objections?
Comment 12 Sven Neumann 2007-07-11 06:16:00 UTC
The string addition is fine if the spec asks us to add such a toggle. I am not happy with the choice of key though since Shift is very common for Keep Aspect. Does the spec suggest this choice?
Comment 13 Sven Neumann 2007-07-11 06:34:13 UTC
I had a look at the updated spec and I think we should try to stick to it at least when it comes to "the ratio/widht/height/size constraint and the shift key". If this needs discussion, then we should have it on the gimp-developer list.
Comment 14 peter sikking 2007-07-11 16:17:02 UTC
I had pencilled in to work on the tool options part of the spec today and have now completed a good chunk of that.

You can see that the image aspect ratio has been integrated as the default value for the crop tool.

No further controls or key presses needed.
Comment 15 Martin Nordholts 2007-08-10 16:48:25 UTC
There is finally a pleasant way of keeping a fixed aspect for the crop tool.

Let's keep this bug report open for a while in case deficiencies are discovered.

Fix commited to trunk, revision 23194:

2007-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimpcroptool.c (gimp_crop_tool_button_release): Set
	default 'Fixed: Aspect ratio' values to the size of the pending
	crop rectangle. Fixes bug #355545.

	* app/tools/gimprectangletool.[ch]
	(gimp_rectangle_tool_get_rectangle_size): New helper function.
Comment 16 Martin Nordholts 2007-08-11 08:50:45 UTC
This seems to work nicely now, closing as FIXED. Please report new issues in new bug reports.