Revert "headerbar: Avoid allocating 0 visible children"

This reverts commit 8c0e5adaab.

This is actually needed since GtkHeaderBar will allocate and snapshot
widget that coun_visible_children does not consider.
This commit is contained in:
Timm Bäder 2017-08-28 16:58:48 +02:00
parent 6589532245
commit a08f8937c6

View File

@ -932,10 +932,6 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
direction = gtk_widget_get_direction (widget); direction = gtk_widget_get_direction (widget);
nvis_children = count_visible_children (bar); nvis_children = count_visible_children (bar);
if (nvis_children == 0)
return;
sizes = g_newa (GtkRequestedSize, nvis_children); sizes = g_newa (GtkRequestedSize, nvis_children);
width = allocation->width - nvis_children * priv->spacing; width = allocation->width - nvis_children * priv->spacing;