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 637298 - Need modern equivalent of deprecated GtkStyle style->color
Need modern equivalent of deprecated GtkStyle style->color
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
gtk-bugs
Depends on:
Blocks: 636654
 
 
Reported: 2010-12-15 11:49 UTC by Guillaume Desmottes
Modified: 2010-12-15 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2010-12-15 11:49:49 UTC
So, I'm trying to port Empathy to GtkStyleContext (bug #636654) and I'm blocked because it seems there is no modern equivalent of some old API. One is accessing colors from the theme. We use to do things like style->white but I didn't find any equivalent in the new API.
Comment 1 Matthias Clasen 2010-12-15 12:18:04 UTC
White is easy: { 1.0, 1.0, 1.0, 1.0 } (the white color in GtkStyle was never in any way theme-dependent)

For colors in general, see gtk_style_context_get{_, _background_, _border_}color.
Also see the section on colors in the migration guide (it will be expanded in the next release).
Comment 2 Guillaume Desmottes 2010-12-15 14:04:45 UTC
I see, thanks for the clarification.