[gtk+] frame: Don't move border gadget and child down



commit 870a5b424f4ff3b07d5524c581e61db5945497ff
Author: Timm Bäder <mail baedert org>
Date:   Fri Feb 26 14:09:28 2016 +0100

    frame: Don't move border gadget and child down
    
    Setting label-yalign should affect the border gadget, but we need to
    compensate for its position by moving the child down or up, depending on
    the border gadget's position, so the child never moves.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762123

 gtk/gtkframe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index d363d41..3fcb641 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -867,7 +867,7 @@ gtk_frame_allocate_border (GtkCssGadget        *gadget,
 
   if (priv->label_widget &&
       gtk_widget_get_visible (priv->label_widget))
-    height_extra = priv->label_allocation.height * priv->label_yalign;
+    height_extra = priv->label_allocation.height * (1 - priv->label_yalign);
   else
     height_extra = 0;
 


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