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.
This commit is contained in:
Matthias Clasen
2020-05-03 11:41:57 -04:00
parent 77cf6cd406
commit 130ae89e54

View File

@@ -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;