Skip to content

Ensure icon sizes

Fixes #39 (closed)

There are 2 ways for fixing that:

  • Augment the icon theme at startup: check for missing icon sizes and provide the scaled icons to the Gtk::IconFactory. This is the most transparent fix and the one I prefer.
  • Wrap all Gtk::Image and Gtk::CellRendererPixbuf objects. For Gtk::Image set the pixel-size property which forces the size, unlike the symbolic icon-size property. For Gtk::CellRendererPixbuf there is no corresponding property to force the size, it only has the symbolic stock-size (akin to icon-size in Gtk::Image). So we load the pixbuf, scale if needed, and set the pixbuf to the GtkCellRenderer. This means that GtkCellRendererPixbuf can't change icons at runtime when the icon theme is changed by the user.
Edited by Luca Bacci

Merge request reports