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 127676 - gradient view of "Device Status" dialog should use each devices context for gradient view
gradient view of "Device Status" dialog should use each devices context for g...
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Low minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on: 128367
Blocks:
 
 
Reported: 2003-11-22 17:50 UTC by Daniel Rogers
Modified: 2006-08-29 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pair of screenshots showing the problem with the device status box (17.76 KB, image/jpeg)
2003-11-22 17:52 UTC, Daniel Rogers
Details

Description Daniel Rogers 2003-11-22 17:50:38 UTC
When I have multiple input devices (e.g. wacom sylus and eraser) the device
status dialog shows the gradient associated with that tool.  However, if
the gradient is autogenerated from the background and forground colors,
then the gradient associated with a particular device is generated from
whatever the currently selected device is.

Attached next is a screen shot.  All but the stylus have autogenerated
gradients.  When the sytlus is selected then all the autogenerated
gradients are generated from the forground and background of the stylus. 
When the eraser is selected, the forground and background of the eraser is
used.
Comment 1 Daniel Rogers 2003-11-22 17:52:10 UTC
Created attachment 21698 [details]
pair of screenshots showing the problem with the device status box
Comment 2 Sven Neumann 2003-11-22 18:49:21 UTC
The special gradients are at the moment always taken from the user
context. We will probably have to create them in every context or
perhaps add code to create them when they are needed. Then each
context can take care of updating the gradients when the FG/BG colors
change.
Comment 3 Sven Neumann 2003-11-25 12:18:10 UTC
There will be a major undertaking or an evil hack needed in order to
fix this. I don't think this is a severe problem so I am lowering the
priority. I don't think we will fix this for 2.0.
Comment 4 Sven Neumann 2003-12-02 15:39:26 UTC
Bug #128367 outlines a nice way to get this fixed. Instead of adding
special gradients into the gradient list, the GIMP gradients should
allow to have control-points that get their color dynamically from the
FG or BG color. The gradient would have to be always rendered in a
context then and this would solve the problem outlined here.
Comment 5 Sven Neumann 2004-09-24 10:24:30 UTC
Bumping to FUTURE since it won't make it into 2.2.
Comment 6 Michael Natterer 2006-08-29 18:23:45 UTC
The patch for this is almost done, setting milestone to 2.4
Comment 7 Michael Natterer 2006-08-29 21:47:20 UTC
Fixed in CVS:

2006-08-29  Michael Natterer  <mitch@gimp.org>

	Changed GimpViewable preview rendering to have a context to get
	FG/BG/whatever from. Use the context to enable dynamic FG/BG
	colors in gradients. Fixes bug #127676 and bug #352214. Addresses
	bug #128367 (doesn't fix it because there's no loading/saving and
	no GUI yet).

	* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
	specifying gradient colors in terms of foreground and background.

	* app/core/gimpgradient.[ch]: added color_type members to the
	GimpGradientSegment struct and honor them in
	gimp_gradient_get_color_at(). Added GimpContext parameters to all
	functions which finally call get_color_at().

	* app/core/gimp-gradients.c: use the new method to implement the
	builtin gradients.

	* app/core/gimpviewable.[ch]: added GimpContext parameters to all
	get_preview() and get_pixbuf() functions.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpgradient.c
	* app/core/gimpimage-preview.[ch]
	* app/core/gimpimagefile.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/text/gimpfont.c
	* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
	and ::get_pixbuf() implementations accordingly.

	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.[ch]
	* app/dialogs/dialogs-constructors.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimptexttool.c
	* app/actions/gradient-editor-commands.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpbrusheditor.[ch]
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpclipboard.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainercombobox.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerentry.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimppropwidgets.[ch]
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpthumbbox.[ch]
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpundoeditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpview-popup.[ch]
	* app/widgets/gimpview.[ch]
	* app/widgets/gimpviewablebutton.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpviewrenderer.[ch]
	* app/widgets/gimpviewrenderer-frame.c
	* app/widgets/gimpviewrendererbrush.c
	* app/widgets/gimpviewrendererbuffer.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimage.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
	and parameters, implement GimpDocked::set_context() in many
	widgets. Pass these locally remembered contexts to GimpViewable
	functions. Did some minor cleanups on the way. There are still
	some minor FIXMEs around where the code uses a NULL context (which
	is allowed by the APIs)

	* app/pdb/drawable_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c: regenerated.