GNOME Bugzilla – Bug 670555
I can't change GtkInfoBar text color via the theme
Last modified: 2012-02-24 07:19:28 UTC
infobars just get inherited text color in adwaita, since we have colored backgrounds there we really need a way to set text color.
Created attachment 208170 [details] [review] patch
*** Bug 670553 has been marked as a duplicate of this bug. ***
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?
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
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 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.
Reworded the comment and committed both patches