Commit f54e0a28 authored by Matthias Clasen's avatar Matthias Clasen

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.
parent 35e98dce
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment