Re: Getting the Current Theme's Colors

I had a good amount of code to handle getting absolute theme color
values as part of a patch for libnotify-daemon [1]. You could extract
the functionality you need from the patch - I can't seem to find the
original standalone version anymore :X


I have yet to find time to actually finish this effort :(

>>> Matthew Allen <fret memecode com> 09/20/07 9:09 PM >>>

I'm integrating Lgi, a xlib based application framework, with the Gnome 
desktop. And I want to be able to make an Lgi application sensitive to 
the current theme's fonts and colors so that is blends in with the Gnome


I've worked out how to query for the right system font to use. But I'm 
having a lot of trouble getting information about how to retrieve the 
theme's color scheme. I think I need to use gtk_style_lookup_color or 
maybe the color-hash property of the GtkStyle object. But I can't find 
any example code and the documentation is too brief. For instance 
gtk_style_lookup_color has a string parameter "color_name", but 
absolutely no description of what possible values you might be able to 
pass into it. The sorts of colors I need are the selection bg/fg color, 
text fg/bg, application workspace etc.

Thanks for any help you can provide.

Matthew Allen <mailto:fret memecode com> | Memecode 
<> | SydneyBand <>
desktop-devel-list mailing list
desktop-devel-list gnome org

 Novell, Inc. 
Software for the Open Enterprise™

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