Re: Custom icons and Gtk::IconTheme



On Fri, 2009-07-24 at 11:36 +0200, Juan A. Moreno wrote:
> Hi,
> I'm trying to imagine how to update the custom icons in my program
> when user change the icons theme.

It's hard to know what you're trying to do, but with the programs I've
written, I don't have to do anything when a user changes themes.  I use
Gtk::Action with Gtk::Stock icons to create the Gtk::Toolbar and the
Gtk::MenuBar (see the online book[1]).  When the theme is changed, the
UI changes along without me having to do anything else.  The
GtkIconTheme docs[2] seems to suggest using stock icons if possible.

I think that if you end up using Gtk::IconTheme, you would simply have
to update the icons if the icon theme changes.  See the
gtk_icon_theme_load_icon docs[3].  I'm not an expert so I hope that
helps.

[1]
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-menus-and-toolbars.html
[2] http://library.gnome.org/devel/gtk/2.17/GtkIconTheme.html
[3]
http://library.gnome.org/devel/gtk/2.17/GtkIconTheme.html#gtk-icon-theme-load-icon


-- 
José Alburquerque



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