I try to add some more GtkMenuButtons to the GtkHeaderbar of GitHub - StefanSalewski/SDT: A simple Nim GTK4 drawing and design tool.
But icons set with menuButton.setIconName(“accessories-text-editor”) are very small so that the more complicated icons with some detailed structure can not be recognized.
I followed basically the example from GTK4 for Graphical User Interfaces.
In that example the icon name “open-menu-symbolic” is used, which has not many details, so tiny size is not a problem. But as you can see in that example the image is much smaller than the button. So there would be room for a larger image.
I tried for much more than an hour to find a solution, but failed. My SDT app has already an Image widget and an UTF label in the headerbar. For the Image I used worldImage.setIconSize(IconSize.large) to make it a bit larger, and for the UTF-8 Grid symbol I used pango markup with gridLabel.setMarkup(“\u{25A6}”). But for the GtkMenuButton thre seems to be no way to avoid the tiny size.
This is for a recent GTK4 version build from git sources for Linux.
The new API docs tell us: Gtk.MenuButton.new
You can replace the child widget with another
GtkWidget
should you wish to.
But that seems not to be easy.