forked from AuroraMiddleware/gtk
frame: don't access padding before it's initialized
Move padding initialization before its first access.
This commit is contained in:
parent
6a6af8464b
commit
0d71f62388
@ -860,6 +860,9 @@ gtk_frame_get_preferred_size (GtkWidget *request,
|
||||
gint minimum, natural;
|
||||
guint border_width;
|
||||
|
||||
get_padding_and_border (frame, &padding);
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
|
||||
if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
|
||||
{
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
@ -902,9 +905,6 @@ gtk_frame_get_preferred_size (GtkWidget *request,
|
||||
}
|
||||
}
|
||||
|
||||
get_padding_and_border (frame, &padding);
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
minimum += (border_width * 2) + padding.left + padding.right;
|
||||
|
Loading…
Reference in New Issue
Block a user