Getting the default style



Hi,

I'm trying to add support for using the current GTK colour scheme to
parts of Wine, so tray icons fit in properly with the gnome tray applet.

I'm wondering what the easiest way to get the normal background colour
is - I know how to get the theme name from XSETTINGS, so I can either

a) Parse the gtkrc file myself
b) dlopen() gtk2 and ask it for the default style, then read
style->bg[whatever]

Unfortunately, I'm being really slow.... I can't see how to get the
default style. The functions in the "style" section appear largely
undocumented, and there are none that sound like they'd do what I want.
The RC section looks promising, but I need to have a widget for it to
use, which I'd rather not create, plus I don't know if that will take
into account the default theme...

Does anybody know the right way to do this?
thanks -mike

-- 
Mike Hearn <m hearn signal qinetiq com>
QinetiQ - Malvern Technology Center




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]