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 670555 - I can't change GtkInfoBar text color via the theme
I can't change GtkInfoBar text color via the theme
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 670553 (view as bug list)
Depends on:
Blocks: 647288
 
 
Reported: 2012-02-21 16:16 UTC by Lapo Calamandrei
Modified: 2012-02-24 07:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.57 KB, patch)
2012-02-21 22:47 UTC, Paolo Borelli
none Details | Review
patch (955 bytes, patch)
2012-02-23 23:30 UTC, Paolo Borelli
accepted-commit_now Details | Review
patch (19.43 KB, patch)
2012-02-23 23:33 UTC, Paolo Borelli
accepted-commit_now Details | Review

Description Lapo Calamandrei 2012-02-21 16:16:22 UTC
infobars just get inherited text color in adwaita, since we have colored backgrounds there we really need a way to set text color.
Comment 1 Paolo Borelli 2012-02-21 22:47:25 UTC
Created attachment 208170 [details] [review]
patch
Comment 2 Akhil Laddha 2012-02-22 04:26:36 UTC
*** Bug 670553 has been marked as a duplicate of this bug. ***
Comment 3 Benjamin Otte (Company) 2012-02-23 14:58:51 UTC
I think the patch needs to gtk_style_context_remove_class() the old type. Otherwise it looks good to me.

And is it possible to do a reftest for that?
Comment 4 Paolo Borelli 2012-02-23 23:30:56 UTC
Created attachment 208311 [details] [review]
patch

Creating the reftest actually highlighted an unrelated bug: the current "if message type == previous type then return" optimization in the property setter results in the setter never running the first time when the message is of type info, hence atk and css classes are not set at all
Comment 5 Paolo Borelli 2012-02-23 23:33:28 UTC
Created attachment 208312 [details] [review]
patch

Updated patch including a reftest. It requires the above patch to actually pass.

The reftest for now comments out bg colors since labels do not respect it yet, but I did not feel like redoing the reftest with eventboxes to work around the bug and the fg color for now is already enough to check class are being set.
Comment 6 Benjamin Otte (Company) 2012-02-23 23:37:41 UTC
Comment on attachment 208311 [details] [review]
patch

Looks fine to me.

You could update the coment to mention that the message type property is a CONSTRUCT property so it'll be reset during construction.
Comment 7 Paolo Borelli 2012-02-24 07:19:28 UTC
Reworded the comment and committed both patches