stock icons (was: Re: Some initial thoughts about 2.4)



Hi,

> At one point I thought there was talk of integrating desktop
icon sets
> with gtk+ stock icons... I think we could benefit
significantly from
> some kind of reworking of how icon sets are handled in gtk+.
 For
> instance, at the moment replacing the GTK+ stock icons in a
theme is
> messy for several reasons:

> * you have to specify separate image files for every icon,
in the RC
> file;
> * you keep the precompiled default icons around (though of
course they
> page out)
> * the gtk+ stock icons are likely to live somewhere other
than the > other
> icons;
> * the only way to reliably respecify icon size is to use *only*
> rescalable/wildcarded icons in the RC file, or provide
pre-scaled icons
> for each non-wildcarded icon/nominal-size combination, further
> increasing the size of the RC file.

> There are other issues as well, I think.  So I believe that some
> rethinking of the icon API with possible extensions would be
a good
> idea.  At the least, it'd be nice to integrate the GTK+
stock icon
> mechanism with the desktop-icon-set mechanism if possible.

Here is a proposal; I think the simplest way to handle this is
to use
directories this way :

    <gnome-base-pixmaps>/<theme>/<size>/<icon_file>

where :

_ <gnome-base-pixmaps> is a distinct gnome-specific pixmaps
directory
  (because when you look at a typical /usr/share/pixmaps, you
find a
  mixture of icons from different origins/styles/qualities and
so on)

_ <theme> is the theme directory (with one called "default",
because
  it comes with gtk tarball); so to install a new icons set
themes you
  only have to unpack a proper <theme>.tgz;

_ there must be at least one <size> directory, which has the form
  <width>x<height>. Provided size(s) should match HIG standard
ones
  (48x48, 24x24...)

_ <icon_file> is the .png file named after the stock ID name
  (cut.png, paste.png)

So the basic algo for retrieving icon files should be: search
<theme>
directory, then default one; search for the best-fit <size>
directory...




Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,13 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)"






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