label: Remove dead code
This code has been useless for a while, and now it's breaking things.
Moving the paned in tests/testheightforwidth's wrapping label shows that
bug.
Broken since 9992efdb0e
This commit is contained in:
parent
45d01b684a
commit
93b0cecd7e
@ -3313,8 +3313,7 @@ gtk_label_update_layout_width (GtkLabel *label)
|
|||||||
pango_layout_set_width (priv->layout, aux_width * PANGO_SCALE);
|
pango_layout_set_width (priv->layout, aux_width * PANGO_SCALE);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PangoRectangle rect;
|
gint xpad, ypad;
|
||||||
gint xpad, ypad, natural_width;
|
|
||||||
gtk_misc_get_padding (GTK_MISC (label), &xpad, &ypad);
|
gtk_misc_get_padding (GTK_MISC (label), &xpad, &ypad);
|
||||||
|
|
||||||
if (angle == 90 || angle == 270)
|
if (angle == 90 || angle == 270)
|
||||||
@ -3322,12 +3321,6 @@ gtk_label_update_layout_width (GtkLabel *label)
|
|||||||
else
|
else
|
||||||
width = allocation.width - xpad * 2;
|
width = allocation.width - xpad * 2;
|
||||||
|
|
||||||
/* dont set a wrap width wider than the label's natural width
|
|
||||||
* incase we're allocated more space than needed */
|
|
||||||
pango_layout_get_extents (priv->layout, NULL, &rect);
|
|
||||||
natural_width = PANGO_PIXELS (rect.width);
|
|
||||||
width = MIN (natural_width, width);
|
|
||||||
|
|
||||||
pango_layout_set_wrap (priv->layout, priv->wrap_mode);
|
pango_layout_set_wrap (priv->layout, priv->wrap_mode);
|
||||||
pango_layout_set_width (priv->layout, MAX (width, 1) * PANGO_SCALE);
|
pango_layout_set_width (priv->layout, MAX (width, 1) * PANGO_SCALE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user