Use window title, or custom title widget if it's set. Remove 'title'
property.
Update demos and tests to set the title on the window instead of
headerbar.
Now that the title buttons are encapsulated in a separate widget, use
it in the header bar.
Hide them when empty, so that they don't add extra spacing.
Update the layout when any of the following properties changes:
* modal
* transient-for
* resizable
* deletable
Stop updating it from GtkWindow, make that function static.
Add the following actions:
* window.close
* window.toggle-maximize
* window.minimize
Ensure they are disabled when not appropriate, such as for modal windows.
Use them in GtkHeaderBar.
The application menu isn't particular relevant anymore, and the support for
showing fallback appmenu as a headerbar icon is one of the things tying
GtkWindow to GtkHeaderBar.
Remove support for "menu" window decoration element completely, update
GtkHeaderBar docs.
This was only living in gtkcontainer.c for historic
reasons. Move it closer to where it belongs, and
rename it from 'idle' to 'layout', since it is
really about the layout phase of the frame clock,
nowadays.
The "iconified" state is mostly an X11-ism; every other platform calls
this state "minimized" because it may not involve turning a window into
an icon at all.
The signal handler that calls notify_child_cb() is disconnected
from a child widget before the child is removed from the header bar.
gtk_header_bar_dispose() chains up before destroying the start and end
boxes, thus avoiding calls to notify_child_cb() after start_box and
end_box have been cleared.
Fixes#2246
This allows custom titles to use the vertical alignment of their choice
without having to set it manually after it has been added to the header
bar, hence allowing them to define their preferred alignment from a UI
template.
This is useful for widgets like the view switcher which requires filling
the header bar's whole height.
There are two ways GTK can add a headerbar to a dialog:
- the dialog is constructed with the :use-header-bar property
- all windows should use client-side decorations
In the first case, the headerbar is added by GtkDialog with no
dedicated style class, and in the latter by GtkWindow with the
"default-decoration" style.
As a result, dialogs with plain titlebars can end up with clearly
distinct and inconsistent styles.
To address this, allow headerbars to track whether they should use
the "default-decoration" style and enable it for dialogs.
https://gitlab.gnome.org/GNOME/gtk/merge_requests/836