summaryrefslogtreecommitdiff
path: root/gtk/gtkframe.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-03 11:41:57 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-04 07:37:31 -0400
commit130ae89e54ef28903d9496ddbbb9bced314692b3 (patch)
tree83daff8f81bf0d8b80ef195b350bee41299e31e1 /gtk/gtkframe.c
parent77cf6cd406ff0ce3d693b5c1a6ebb02681833c34 (diff)
downloadgtk+-130ae89e54ef28903d9496ddbbb9bced314692b3.tar.gz
frame: Fix xalign handling
SEtting a nonzero xalign on frames had no effect, since we were always using the full allocation with here, instead of what the label needs. Found by using testframe for a second.
Diffstat (limited to 'gtk/gtkframe.c')
-rw-r--r--gtk/gtkframe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 6381e6974d..8a1c79a341 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -517,7 +517,7 @@ gtk_frame_size_allocate (GtkWidget *widget,
gtk_widget_measure (priv->label_widget, GTK_ORIENTATION_VERTICAL, width,
&label_height, NULL, NULL, NULL);
- label_allocation.x = new_allocation.x + (new_allocation.width - width) * xalign;
+ label_allocation.x = new_allocation.x + (new_allocation.width - label_width) * xalign;
label_allocation.y = new_allocation.y - label_height;
label_allocation.height = label_height;
label_allocation.width = label_width;