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 119470 - DnD interface for the gradient editor
DnD interface for the gradient editor
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Normal enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2003-08-09 09:15 UTC by Jakub Steiner
Modified: 2006-05-20 22:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mockup of a possible gradient editor interface (16.38 KB, image/png)
2003-09-08 23:17 UTC, Jakub Steiner
  Details
patch for app/widgets/gimpgradienteditor.c (4.67 KB, patch)
2005-03-01 21:42 UTC, weskaggs
none Details | Review
revised patch for gimpgradienteditor.c (4.82 KB, patch)
2005-03-01 23:06 UTC, weskaggs
committed Details | Review

Description Jakub Steiner 2003-08-09 09:15:20 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 ;)
Comment 1 Jakub Steiner 2003-09-08 23:17:18 UTC
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.
Comment 2 Jakub Steiner 2003-09-08 23:17:51 UTC
Created attachment 19818 [details]
mockup of a possible gradient editor interface
Comment 3 weskaggs 2005-03-01 21:42:31 UTC
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.
Comment 4 weskaggs 2005-03-01 22:53:23 UTC
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.
Comment 5 weskaggs 2005-03-01 23:06:55 UTC
Created attachment 38129 [details] [review]
revised patch for gimpgradienteditor.c

Well, all right, here's the revised version.
Comment 6 weskaggs 2005-03-02 16:19:36 UTC
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.
Comment 7 weskaggs 2006-05-20 22:52:48 UTC
I am going to resolve this as FIXED.  If there is more to be done, let's open a new bug report for it.