From: Timm Bäder Date: Sun, 15 Apr 2018 08:49:37 +0000 (+0200) Subject: frame: Stop saving label and child allocation X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~491 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=be77e0d500ef8eb43345e970e80f735b3e71cc2d;p=gtk4.git frame: Stop saving label and child allocation We don't use them for anything anymore. --- diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 3afb54ecb6..fcc1135971 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -94,9 +94,6 @@ struct _GtkFramePrivate gint16 shadow_type; gfloat label_xalign; - - GtkAllocation child_allocation; - GtkAllocation label_allocation; }; enum { @@ -580,13 +577,13 @@ gtk_frame_size_allocate (GtkWidget *widget, GtkAllocation new_allocation; gtk_frame_compute_child_allocation (frame, &new_allocation); - priv->child_allocation = new_allocation; if (priv->label_widget && gtk_widget_get_visible (priv->label_widget)) { - gint nat_width, width, height; - gfloat xalign; + GtkAllocation label_allocation; + int nat_width, width, height; + float xalign; if (_gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) xalign = priv->label_xalign; @@ -599,19 +596,17 @@ gtk_frame_size_allocate (GtkWidget *widget, gtk_widget_measure (priv->label_widget, GTK_ORIENTATION_VERTICAL, width, &height, NULL, NULL, NULL); - priv->label_allocation.x = new_allocation.x + (new_allocation.width - width) * xalign; - priv->label_allocation.y = new_allocation.y - height; - priv->label_allocation.height = height; - priv->label_allocation.width = width; + label_allocation.x = new_allocation.x + (new_allocation.width - width) * xalign; + label_allocation.y = new_allocation.y - height; + label_allocation.height = height; + label_allocation.width = width; - gtk_widget_size_allocate (priv->label_widget, &priv->label_allocation, -1); + gtk_widget_size_allocate (priv->label_widget, &label_allocation, -1); } child = gtk_bin_get_child (GTK_BIN (widget)); if (child && gtk_widget_get_visible (child)) - { - gtk_widget_size_allocate (child, &priv->child_allocation, -1); - } + gtk_widget_size_allocate (child, &new_allocation, -1); } static void