Skip to content

headerbar: Don't change the custom title's valign

Adrien Plazas requested to merge (removed):header-custom-title-valign into master

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.

See the design of the view switcher here: https://gitlab.gnome.org/Teams/Design/os-mockups/tree/master/view-switcher.

Given that this would break what the apps expect from the widget and that GTK_ALIGN_FILL is the default, it's likely better to do this change before the release fo GTK 4.0, so the application devs can know they need to manually center their custom title.

For reference, this is one of the changes I introduced into the GtkHeaderBar fork HdyHeaderBar to allow HdyViewSwitcher to work: https://source.puri.sm/Librem5/libhandy/blob/master/src/hdy-header-bar.c#L40. Ultimately I would like to get rid of this widget for GTK 4 by having the same functionality into GTK proper.

Merge request reports