GNOME Bugzilla – Bug 756132
GtkColorChooser doesn't let the user pick a color on the screen
Last modified: 2017-12-08 02:46:53 UTC
Unlike GtkColorSelectionDialog (which is deprecated), GtkColorChooser doesn't let the user select a color on the screen i.e. click one part of the screen to set the selected color to this one. IMHO this was a nice feature, and it would be preferable to have as part of the color picker widget instead of having the need for each developer to implement its own solution. Or should this be WONFIX and developers should use GtkColorSelectionDialog for this purpose? (even if it is deprecated). IMHO, seems to be the new GTK color picker, it seems more coherent if every GTK3 application uses it, that it would be better to have this feature as part of GtkColorChooser.
This feature is really not going to be implementable on all platforms — basically, only on X11. On Wayland, it would need a specific protocol extension to talk to the compositor. I'm not sure this would be implementable on OSX and Windows.
To complete my description: I worked on implementing the HTML5 attribute <input type="color"> on Firefox, which uses the native platform widget. This meant GtkColorSelectionDialog on Linux/GTK, until recently when we migrated to GTK3 and someone migrated to GtkColorChooser. One of the cool features of input type color was (in addition of native look and feel over javascript based implementation) the possibility for users to select a color on the screen (OS X color picker does it too, but not Windows), which otherwise would not be possible at all for a Web application. I don't mean to ask for the feature just for my specific use case, but just wanted to give an example :) (but I'm sure it would be useful for other developers too).
(In reply to Emmanuele Bassi (:ebassi) from comment #1) > This feature is really not going to be implementable on all platforms — > basically, only on X11. > > On Wayland, it would need a specific protocol extension to talk to the > compositor. I'm not sure this would be implementable on OSX and Windows. Do you think it would be worth to implement it only on supported platform? (X11 in a first time at least). I know this means less coherency (which is bad) but I really believe this feature can be useful.
(for reference, the bug on Mozilla's bugzilla when we started to discuss about this issue for our use case: https://bugzilla.mozilla.org/show_bug.cgi?id=1198256)
If somebody is interested enough to produce a patch, I wouldn't be fundamentally opposed. The color picker code still exists in gtk/deprecated/gtkcolorsel.c. I would expect the picker to be placed in the color editor, on platforms that support it. The code should ideally be kept separate in a private gtkcolorpicker widget. Bonus points for arranging things so that the deprecated colorselection uses the same code.
*** Bug 775889 has been marked as a duplicate of this bug. ***
The new color chooser is a whole regression compared to GtkColorSelectionDialog, in every user case. I suggest a revert, and i think many users would be happy with that.
But that's not what this bug is about. Besides, it is nowhere near as easy to revert to a GTK+ 2 widget from a technical or desirable from a code/UI design perspective (i.e. I doubt any maintainer will want to do so).
Since nobody has stepped forward in the 2 years since comment 5, lets close this for now.