GTK+ 4 issues
Gtk::Toolbar and related widgets have been removed as "outdated". The suggested replacement is a Gtk::Box with normal widgets. This means that toolbars will have a minimum width defined by the sum of the widths of their child widgets rather being allowed to shrink to a smaller width with "over-flowing" widgets being replaced by a drop-down menu at the end of the toolbar. This requires us to re-think our toolbars.
In practice, many of the replacement menu items for dropped widgets are not very practical. Having toolbars that are quite wide probably is a sign of poor design. Many of the current toolbar widgets could be packed in non-modal popovers, that is, pop-up menus that stay open until dismissed. It would be relatively easy to then reduce most toolbar widths to less than 1000 pixels. The most difficult toolbar to reduce in size is the main toolbar. This could be dealt with by removing all the dialog buttons. One might think of putting all dialogs into a new menu bar sub-menu or into a modal popover.
The longest toolbars (width):
- Text (1650)
- Calligraphy (1450)
- Main Toolbar (1350 - Horizontal, 950 - Vertical)
- Selector (1300)
- Spray Paint (1300)
- Node (1250)
- Ruler (1100)
- Eraser (1050)
- Tweak (1050)
- Tool Toolbar (800 - Vertical)
- Snapping (750 - Vertical)
We need to decide on the minimum size window we should target. The current minimum window size is about 811x524 pixels with main toolbar on top. Most modern budget displays are 1366x768. Older displays might be 1024x768.
GTK4 uses menus based on Gio::Menu using Gio::Actions. These are easy to construct with .ui files. They automatically keep in sync with action states and with shortcuts. We are moving to them for the main menu bar in GTK3.
Gio::Menus do have some issues. The first, and perhaps the most important, is with icons. Icons can be specified in the .ui files. In GTK3 they are always shown while in GTK4 they are never shown. There doesn't seem to be any way to toggle their 'visibility' (the icons are there in GTK4 as demonstrated by using the GTK Inspector tool). See: https://discourse.gnome.org/t/toggling-on-off-icon-visibility-in-gmenu-items/7234/2 .
There are several possible solutions to this problem. One is to abandon icons. I do agree that they are rarely really useful... but there are cases where they are helpful. It much easier to understand the direction of rotation from an arrow than remembering what "CW" means. Some icons could be replaced by using Unicode characters:
- ⮷ Rotate 90 CW
- ⮶ Rotate 90 CCW
- 🡘 Flip Horizontally
- ⭥Flip Vertically
- ⤒Raise to top
Another solution would be to dissect the GTK Inspector code to learn how to toggle the 'visibility' property (note, this is not a CSS property). For GTK3 it would also be possible to provide three different .ui files, one with all icons, one with just a handful, and one with none.