[clutter] clutter-flow-layout: fix non-0,0 offset allocation



commit 73d3026dd192f2bf102107d7c41c59d5d163ad08
Author: Dan Winship <danw gnome org>
Date:   Fri Sep 2 12:51:46 2011 -0400

    clutter-flow-layout: fix non-0,0 offset allocation
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649631

 clutter/clutter-flow-layout.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-flow-layout.c b/clutter/clutter-flow-layout.c
index 765c22d..b1d9ac5 100644
--- a/clutter/clutter-flow-layout.c
+++ b/clutter/clutter-flow-layout.c
@@ -622,7 +622,7 @@ clutter_flow_layout_allocate (ClutterLayoutManager   *manager,
               item_x = x_off;
             }
 
-          new_x = ((line_item_count + 1) * (avail_width + priv->col_spacing))
+          new_x = x_off + ((line_item_count + 1) * (avail_width + priv->col_spacing))
                 / items_per_line;
           item_width = new_x - item_x - priv->col_spacing;
           item_height = g_array_index (priv->line_natural,
@@ -661,7 +661,7 @@ clutter_flow_layout_allocate (ClutterLayoutManager   *manager,
               item_y = y_off;
             }
 
-          new_y = ((line_item_count + 1) * (avail_height + priv->row_spacing))
+          new_y = y_off + ((line_item_count + 1) * (avail_height + priv->row_spacing))
                 / items_per_line;
           item_height = new_y - item_y - priv->row_spacing;
           item_width = g_array_index (priv->line_natural,



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