Re: Gtk-3.14.3 on Windows: icon rendering issues

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

 



Hi;

sorry, it was late at night and I was on my phone, so I was unhelpfully terse.

On 20 May 2015 at 01:32, Daniel Kasak <d.j.kasak.dk@xxxxxxxxx> wrote:
> Can you please explain this further? I had assumed this was the
> correct way to ask for the 'new' icon, from whatever icon theme was
> selected.

No, that's the way you use the deprecated GTK+ stock items, which may
have an associated icon and may have an associated label, or both, or
even neither. Stock icons may map to icons that may be outsourced to
the current icon theme, or to resources embedded into the GTK+'s
shared library, or to resources inside an application, if the
application registers their own stock items.

This whole mess has been deprecated (and rightfully so) because it
makes it impossible to actually determine what will go to the screen
reliably; it was added before we had icon themes, and survived far too
long afterwards.

If you want to use symbolic names for icons, as opposed to loading
assets using GdkPixbuf, you should use the name of the icon in the
icon theme — in this case, 'document-new' instead of 'gtk-new' (which
is the string hiding behind the GTK_STOCK_NEW symbol).

The deprecation notes for each stock item here:

  https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html

And the freedesktop.org icon naming specification here:

  http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html

Should give you a head start on porting your code and your coding
practices. The Adwaita icon theme (which is used as a template for
most icon themes available these days) contains more icons that you
can use.

> Also I'm not convinced this build is working correctly WRT selecting
> icon themes - as noted, changing the theme in my settings.ini has no
> effect on icons that do get rendered ( and there aren't many of them
> ).

You need to check that the icon theme is in the correct path (usually:
PREFIX/share/icons); that the icon theme cache is updated
(gtk-update-icon-cache or gtk3-update-icon-cache is run after
installation); that the GdkPixbuf loader are set and available for the
various formats used by the icon theme assets.

Ciao,
 Emmanuele.

> Dan
>
> On Wed, May 20, 2015 at 10:04 AM, Emmanuele Bassi <ebassi@xxxxxxxxx> wrote:
>> Hi;
>>
>> Do not use "gtk-new" and other stock button names: use the correctly named
>> icons from the theme.
>>
>> Ciao,
>>  Emmanuele.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list





[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux