How are icon names translated in gtk?

Named icons follow the XDG icon theme specification.

If you specify icon-name as the name, then the icon will be matched to the current icon theme name, and to the size specified when looking up the icon—using gtk_icon_theme_lookup_icon(). In absence of an explicit size, like gtk_image_set_pixel_size() the size is computed by the style.

The -symbolic bit is a separate GTK extension that hasn’t been codified in the specification; it’s a suffix, so if you select icon-name-symbolic you’ll get the symbolic icon if it exists, and if it doesn’t you’ll get icon-name.

1 Like