Enumeration

GtkIconSize

Declaration

enum Gtk.IconSize

Description [src]

Built-in stock icon sizes.

Members

Name Description
GTK_ICON_SIZE_INVALID

Invalid size.

GTK_ICON_SIZE_MENU

Size appropriate for menus (16px).

GTK_ICON_SIZE_SMALL_TOOLBAR

Size appropriate for small toolbars (16px).

GTK_ICON_SIZE_LARGE_TOOLBAR

Size appropriate for large toolbars (24px)

GTK_ICON_SIZE_BUTTON

Size appropriate for buttons (16px)

GTK_ICON_SIZE_DND

Size appropriate for drag and drop (32px)

GTK_ICON_SIZE_DIALOG

Size appropriate for dialogs (48px)

Type functions

gtk_icon_size_from_name

Looks up the icon size associated with name.

Deprecated since: 3.10

gtk_icon_size_get_name

Gets the canonical name of the given icon size. The returned string is statically allocated and should not be freed.

Deprecated since: 3.10

gtk_icon_size_lookup

Obtains the pixel size of a semantic icon size size:

GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function

isn’t normally needed, gtk_icon_theme_load_icon() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.

gtk_icon_size_lookup_for_settings

Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular GtkSettings. Normally size would be

GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function

isn’t normally needed, gtk_widget_render_icon_pixbuf() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by gtk_icon_size_lookup(), because themes are free to render the pixbuf however they like, including changing the usual size.

Available since: 2.2

Deprecated since: 3.10

gtk_icon_size_register

Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU, etc. Returns the integer value for the size.

Deprecated since: 3.10

gtk_icon_size_register_alias

Registers alias as another name for target. So calling gtk_icon_size_from_name() with alias as argument will return target.

Deprecated since: 3.10