views:

234

answers:

1

I do this:

    self.origbg = self.style.bg[gtk.STATE_NORMAL]

and later in my eventboxes I change the bgcolor to it by doing:

    self.modify_bg(gtk.STATE_NORMAL, color)

However, the color actually changes! It's not the state_normal color that I get from looking at self.style.bg . On my Windows, it's a slightly lighter tint. How do I get the real background color?

+1  A: 

Connect to the widget's "map-event" signal (which is sent when the widget is first shown in a window); this is the first time you can read the real theme colors.

kaizer.se
this should be documented better
Claudiu