[gtk/bin-removal: 16/28] frame: Fix xalign handling



commit 008482d5b77f61518f6329f10ea53a45c8ba85f0
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 3 11:41:57 2020 -0400

    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.

 gtk/gtkframe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 61b6ade71d..a066e76c4b 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -507,7 +507,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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]