Hi, I want to ad da toolbar to my app using gtkmm4.
The toolbar buttons should either open a popup menu or show additional buttons in the same row.
I understand the gtk toolbar was removed and I would like to use the most suitable class for it.
Is it ActionBar, HeaderBar or PopoverMenuBar?
I Hope GtkToolbar back to GTK4.
In my app, I use GtkBox with many buttons at the beginning, it seems wired.
then I replace it with GtkToolbar, after done it, feels better, so I hope it back to GTK4.
A GtkHeaderBar
is the widget for client side decorations; it contains the window controls, the window title, and any other control that should be displayed into the window frame, like a path bar, or the editable document title.
A GtkActionBar
is a container that is generally used for actions related to another container. For instance, the actions associated to a list view. It is similar to GtkHeaderBar
, but it is used for controls inside the window. You can effectively replace it with a bunch of GtkBox
instances with different alignment settings.
A GtkPopoverMenuBar
is a menu bar.
You can simply use a GtkBox
. There’s no need to have weird wrappers around widgets, like the old GtkToolbar
class used to have.
There are some subtle differences in behavior between GtkToolbar and a box of buttons, but that is the current best advice: just use a box with buttons
Ok, thx! I implemented a toolbar using a Gtk::Box with Gtk::Buttons.
I want the keyboard arrow keys to move the focus between the buttons, what do I need to do?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.