GNOME Bugzilla – Bug 119470
DnD interface for the gradient editor
Last modified: 2006-05-20 22:52:48 UTC
The current way to edit a gradients is a little time consuming. It would be nice to have DnD functionality in the editor. What I propose is that the gradient 'node triangles' accept a drag of a color from elsewhere and dropping the color to the gradient preview area would add another node at the spot. I also suggest dropping the possibility to have the node have two colors assigned, since it creates way too much complexity. You can easily mimic this by placing two nodes close to each other. And I bet I can create a complex gradient using DnD in fraction of time required by the current UI. I'm willing to recreate the existing default gradinets if somebody feels like implementing this ;)
In case you disagree with me that the two-sided nodes are unnecersary, here's is a mockup of a possible UI for how thing are defined today. Each node would accept a drop on the top for left-side color and bottom for right side color.
Created attachment 19818 [details] mockup of a possible gradient editor interface
Created attachment 38125 [details] [review] patch for app/widgets/gimpgradienteditor.c Here is a patch that basically makes it happen as described in the main request, ignoring the mockup. Dragging a color into the preview creates a new segment boundary, with both edges set to the dragged color. Dragging onto a black triangle in the control area sets both edge colors to the dragged color. No other functionality of the gradient editor is changed.
There are a couple of changes to make: (1) need to freeze earlier, as pointed out by Mitch; (2) the patch caused a crash when dragging a color onto the rightmost control point. I have fixed them; I don't think it's yet worth attaching an updated patch here.
Created attachment 38129 [details] [review] revised patch for gimpgradienteditor.c Well, all right, here's the revised version.
Committed to HEAD after code review by mitch. 2005-03-02 Bill Skaggs <weskaggs@primate.ucdavis.edu> * gimp/app/widgets/gimpgradienteditor.c: allow dnd of colors into preview and control areas, as described in bug #119470. As jimmac points out, there are a couple of additions that would make this more useful. (1) The dnd cursor could more clearly indicate the precise location of a drop; (2) the gradient editor preview could show a vertical line to indicate the location where a color will be dropped. This of course implements only part of what jimmac requested, but the other features are controversial.
I am going to resolve this as FIXED. If there is more to be done, let's open a new bug report for it.