widget: Always pass on baselines

This commit is contained in:
Timm Bäder 2017-07-04 19:00:00 +02:00 committed by Matthias Clasen
parent fb2bb87bb1
commit e19e3b72a3
2 changed files with 2 additions and 15 deletions

View File

@ -299,12 +299,6 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
min_baseline = -1;
nat_baseline = -1;
}
else if (gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE)
{
/* Ignore requested baseline for non-aligned widgets */
min_baseline = -1;
nat_baseline = -1;
}
else if (min_baseline > reported_min_size ||
nat_baseline > reported_nat_size ||
min_baseline < 0 ||

View File

@ -3793,6 +3793,8 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class)
priv->last_child = NULL;
priv->prev_sibling = NULL;
priv->next_sibling = NULL;
priv->allocated_baseline = -1;
priv->allocated_size_baseline = -1;
priv->sensitive = TRUE;
priv->redraw_on_alloc = TRUE;
@ -5366,9 +5368,6 @@ invalidate:
* margins, and applying the widgets #GtkWidget:halign and
* #GtkWidget:valign properties.
*
* If the child widget does not have a valign of %GTK_ALIGN_BASELINE the
* baseline argument is ignored and -1 is used instead.
*
* Since: 3.10
**/
void
@ -5436,12 +5435,6 @@ gtk_widget_size_allocate_with_baseline (GtkWidget *widget,
}
#endif /* G_ENABLE_DEBUG */
/* Never pass a baseline to a child unless it requested it.
This means containers don't have to manually check for this. */
if (baseline != -1 &&
gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE)
baseline = -1;
alloc_needed = priv->alloc_needed;
/* Preserve request/allocate ordering */
priv->alloc_needed = FALSE;