[gtk+/wip/baedert/gtkimageview: 155/156] frame: Don't move border gadget and child down



commit 04c1ce2f36b13029e9375f1ca31c930acc23b40d
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 799abdf..56fb8c9 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]