label: Allocate gadget before using it

Move the gtk_css_gadget_allocate call before the
gtk_label_update_layout_width call. This fixes the
statusbar label in widget-factory page 2 coming
up fully ellipsized.
This commit is contained in:
Matthias Clasen 2015-12-19 00:33:20 -05:00
parent 35e98dce9b
commit f54e0a283b

View File

@ -4084,6 +4084,11 @@ gtk_label_size_allocate (GtkWidget *widget,
GTK_WIDGET_CLASS (gtk_label_parent_class)->size_allocate (widget, allocation);
gtk_css_gadget_allocate (priv->gadget,
allocation,
gtk_widget_get_allocated_baseline (widget),
&clip);
if (priv->layout)
gtk_label_update_layout_width (label);
@ -4094,11 +4099,6 @@ gtk_label_size_allocate (GtkWidget *widget,
allocation->width,
allocation->height);
gtk_css_gadget_allocate (priv->gadget,
allocation,
gtk_widget_get_allocated_baseline (widget),
&clip);
gtk_label_get_ink_rect (label, &clip_rect);
gdk_rectangle_union (&clip_rect, &clip, &clip_rect);
_gtk_widget_set_simple_clip (widget, &clip_rect);