forked from AuroraMiddleware/gtk
label: Don't set out parameters twice
We set them later again when we calculate the vertical size, so just move the general assignment to -1 into the horizontal branch.
This commit is contained in:
parent
cb419794f8
commit
e75894da13
@ -3767,12 +3767,6 @@ gtk_label_get_preferred_size (GtkWidget *widget,
|
|||||||
gtk_misc_get_padding (GTK_MISC (label), &xpad, &ypad);
|
gtk_misc_get_padding (GTK_MISC (label), &xpad, &ypad);
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
if (minimum_baseline)
|
|
||||||
*minimum_baseline = -1;
|
|
||||||
|
|
||||||
if (natural_baseline)
|
|
||||||
*natural_baseline = -1;
|
|
||||||
|
|
||||||
gtk_label_get_preferred_layout_size (label, &smallest_rect, &widest_rect);
|
gtk_label_get_preferred_layout_size (label, &smallest_rect, &widest_rect);
|
||||||
|
|
||||||
/* Now that we have minimum and natural sizes in pango extents, apply a possible transform */
|
/* Now that we have minimum and natural sizes in pango extents, apply a possible transform */
|
||||||
@ -3837,6 +3831,12 @@ gtk_label_get_preferred_size (GtkWidget *widget,
|
|||||||
|
|
||||||
*minimum_size += xpad * 2;
|
*minimum_size += xpad * 2;
|
||||||
*natural_size += xpad * 2;
|
*natural_size += xpad * 2;
|
||||||
|
|
||||||
|
if (minimum_baseline)
|
||||||
|
*minimum_baseline = -1;
|
||||||
|
|
||||||
|
if (natural_baseline)
|
||||||
|
*natural_baseline = -1;
|
||||||
}
|
}
|
||||||
else /* GTK_ORIENTATION_VERTICAL */
|
else /* GTK_ORIENTATION_VERTICAL */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user