summaryrefslogtreecommitdiff
path: root/gtk/gtkframe.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-04-15 10:49:37 +0200
committerTimm Bäder <mail@baedert.org>2018-04-15 17:12:01 +0200
commitbe77e0d500ef8eb43345e970e80f735b3e71cc2d (patch)
treeef9942a958a2152a8cff5c94f23ddd7c116fee68 /gtk/gtkframe.c
parent2f95b4dd708fad6d81baa693df47893061486e2f (diff)
downloadgtk+-be77e0d500ef8eb43345e970e80f735b3e71cc2d.tar.gz
frame: Stop saving label and child allocation
We don't use them for anything anymore.
Diffstat (limited to 'gtk/gtkframe.c')
-rw-r--r--gtk/gtkframe.c23
1 files changed, 9 insertions, 14 deletions
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