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

Cheers,
Aaron

[1]
http://trac.galago-project.org/attachment/ticket/122/notify-standard-theme-love.diff
I have yet to find time to actually finish this effort :(

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

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

desktop.

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.

Regards
-- 
Matthew Allen <mailto:fret memecode com> | Memecode 
<http://www.memecode.com> | SydneyBand <http://www.sydneyband.com.au>
_______________________________________________
desktop-devel-list mailing list
desktop-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

 Novell, Inc. 
Software for the Open Enterprise™
http://www.novell.com



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