Package: gtk

Function gtk-icon-theme-load-icon-for-scale

Lambda List

gtk-icon-theme-load-icon-for-scale (theme name size scale flags)

Arguments

theme -- a gtk-icon-theme object
name -- a string with the name of the icon to lookup
size -- an integer with the desired icon size
scale -- an integer with the desired scale
flags -- a gtk-icon-lookup-flags flags modifying the behavior of the icon lookup

Return Value

The rendered icon as a gdk-pixbuf object.

Details

Looks up an icon in an icon theme for a particular window scale, scales it to the given size and renders it into a pixbuf. The resulting icon may not be exactly this size, see the gtk-icon-info-load-icon function. This is a convenience function. If more details about the icon are needed, use the gtk-icon-theme-lookup-icon function followed by the gtk-icon-info-load-icon function.

Note that you probably want to listen for icon theme changes and update the icon. This is usually done by connecting to the "style-updated" signal. If for some reason you do not want to update the icon when the icon theme changes, you should consider using the gdk-pixbuf-copy function to make a private copy of the pixbuf returned by this function. Otherwise GTK may need to keep the old icon theme loaded, which would be a waste of memory.
 

See also

2021-11-28