| Davyd ( @ 2008-03-28 15:11:00 |
dear lazyweb (using GTK+ theme colours in custom widgets)
Dear Lazyweb,
I've never quite worked out which GtkStyle element should be used where. I'm hoping that someone can clear some things up for me.

For example, in this new widget I'm writing, I'm trying to set the background colour to be the default window background colour, which I had thought to be self->style->bg[GTK_STATE_NORMAL], but clearly it is not.
What colour should I be using instead?
Update: it turns out the trick is to set the background in the ::realize handler.
Dear Lazyweb,
I've never quite worked out which GtkStyle element should be used where. I'm hoping that someone can clear some things up for me.

What colour should I be using instead?
Update: it turns out the trick is to set the background in the ::realize handler.