[gtk+/wip/carlosg/event-delivery] flowbox: Fix child item allocation



commit fd275f828c360299d9225439b3ae0fe6f94594a0
Author: Timm Bäder <mail baedert org>
Date:   Wed May 10 12:07:15 2017 +0200

    flowbox: Fix child item allocation

 gtk/gtkflowbox.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 7873182..02440b2 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -1830,15 +1830,15 @@ gtk_flow_box_allocate (GtkCssGadget        *gadget,
       /* Do the actual allocation */
       if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
         {
-          child_allocation.x = item_offset;
-          child_allocation.y = line_offset;
+          child_allocation.x = widget_allocation.x + item_offset;
+          child_allocation.y = widget_allocation.y + line_offset;
           child_allocation.width = this_item_size;
           child_allocation.height = this_line_size;
         }
       else /* GTK_ORIENTATION_VERTICAL */
         {
-          child_allocation.x = line_offset;
-          child_allocation.y = item_offset;
+          child_allocation.x = widget_allocation.x + line_offset;
+          child_allocation.y = widget_allocation.y + item_offset;
           child_allocation.width = this_line_size;
           child_allocation.height = this_item_size;
         }


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