Re: Porting GTK+ app from defining custom stock items to using GtkIconTheme



On Sun, 2014-03-02 at 23:29 +0100, Bálint Réczey wrote:
The link I have sent in two of my emails points to a gerrit review,
where
I have marked the relevant parts.
Could you please check it? It should do as fine as a minimal example
to
experienced eyes.

I saw the link already some days ago -- but I am only an average GTK
developer, far from an expert...

One remark:

In your code:
gtk_icon_theme_add_builtin_icon(pixmaps[i].name, GTK_ICON_SIZE_MENU,
pixbuf);
gtk_icon_theme_add_builtin_icon(pixmaps[i].name,
GTK_ICON_SIZE_SMALL_TOOLBAR, pixbuf);

From GTK documentation:
https://developer.gnome.org/gtk3/stable/GtkIconTheme.html#gtk-icon-theme-add-builtin-icon

size: the size at which to register the icon (different images can be
registered for the same icon name at different sizes.)

But you register the same pixbuf object for various sizes.

It was my feeling, that you should specify not the desired, but the
actual size. See bottom most answer here:

http://stackoverflow.com/questions/12521134/gtktoolbutton-with-custom-icon-but-of-stock-icon-size

Best regards,

Stefan Salewski




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