mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
label: use GtkMisc padding again
this was lost in the gadget conversion in a81267c28e
https://bugzilla.gnome.org/show_bug.cgi?id=760522
This commit is contained in:
parent
79fb921ffc
commit
27263f2387
@ -3767,9 +3767,14 @@ gtk_label_get_preferred_size (GtkWidget *widget,
|
||||
{
|
||||
GtkLabel *label = GTK_LABEL (widget);
|
||||
GtkLabelPrivate *priv = label->priv;
|
||||
gint xpad, ypad;
|
||||
PangoRectangle widest_rect;
|
||||
PangoRectangle smallest_rect;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_misc_get_padding (GTK_MISC (label), &xpad, &ypad);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (minimum_baseline)
|
||||
*minimum_baseline = -1;
|
||||
|
||||
@ -3837,6 +3842,9 @@ gtk_label_get_preferred_size (GtkWidget *widget,
|
||||
*minimum_size = smallest_rect.width;
|
||||
*natural_size = widest_rect.width;
|
||||
}
|
||||
|
||||
*minimum_size += xpad * 2;
|
||||
*natural_size += xpad * 2;
|
||||
}
|
||||
else /* GTK_ORIENTATION_VERTICAL */
|
||||
{
|
||||
@ -3870,6 +3878,9 @@ gtk_label_get_preferred_size (GtkWidget *widget,
|
||||
*minimum_size = MIN (smallest_rect.height, widest_rect.height);
|
||||
*natural_size = MAX (smallest_rect.height, widest_rect.height);
|
||||
}
|
||||
|
||||
*minimum_size += ypad * 2;
|
||||
*natural_size += ypad * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user