Re: GtkStockIcon and GtkIconFactory



Martin Baulig <martin home-of-linux org> writes: 
> How does this API handle different sets of icon sizes ?
> 
> I mean, currently there is GTK_ICON_SIZE_*, but the actual size is
> hard-coded in gtkiconfactory.c.
> 
> However, I think sometimes it is desirable for a theme to override all
> the sizes - for instance when you want to have a theme with very big icons,
> it looks much better if the theme provides the big icons rather than scaling
> the small ones.
> 

One thing is that the size in GTK_ICON_SIZE_* shouldn't be hardcoded
(well, it isn't actually hardcoded because apps can change it with
icon_size_register() or whatever, but themes couldn't realistically do
that). In gtkrc or as a user pref you should likely be able to change
it.

But there are two ways themes can currently affect this. One is by
specifying an icon for a size:

 stock["gtk-open"] = {
   { "mybigopen.png", *, *, "gtk-large-toolbar" }
 }

in this case the default theme engine won't scale mybigopen.png. 

The other way is to write a theme engine and override the function
that maps icon sources to icon sets.

Havoc





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