samedi 28 février 2015

GTK3 CSS colors not respected - even in official example



I've been suffering with a simple task: I want to make a GtkLabel's background and text another color. I've read many pages, and as such also tried to put an EventBox behind the label and changeing the box's bg color instead. All to no avail.


Then I came across this tutorial, which I copied, compiled without change, and it has the same problem: The background isn't yellow, and the text isn't blue, as they are supposed to be. I even tried replacing the 'yellow' color by rgba(1, 0.5, 0.5, 1) to be sure there was no transparency.


An extra fact: The font is being changed correctly! So the CSS is really being interpreted.


So, why doesn't this work? (I've come across another user with the exactly same problem - no solution though).


Suspecting: is it possible that the theme is somehow blocking later changes? I would suppose that later defined CSS should override any theme definition?


Note: I'm using gtk 3.12.2




Aucun commentaire:

Enregistrer un commentaire