[clutter/clutter-1.14] box-layout: Fix RTL layout swapping with non-zero container offsets



commit 51ab8f36c0db72eb65d96da75ab10a43ff8c6785
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jun 14 17:49:01 2013 -0400

    box-layout: Fix RTL layout swapping with non-zero container offsets
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706450
    (cherry picked from commit 05f56affe19468e1e54281230cd23333f94cfebb)
    Signed-off-by: Emmanuele Bassi <ebassi gnome org>

 clutter/clutter-box-layout.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-box-layout.c b/clutter/clutter-box-layout.c
index 19d9fb3..f7af4ef 100644
--- a/clutter/clutter-box-layout.c
+++ b/clutter/clutter-box-layout.c
@@ -1219,10 +1219,8 @@ clutter_box_layout_allocate (ClutterLayoutManager   *layout,
             {
               gfloat width = child_allocation.x2 - child_allocation.x1;
 
-              child_allocation.x1 = box->x2 - box->x1
-                                  - child_allocation.x1
-                                  - (child_allocation.x2 - child_allocation.x1);
-              child_allocation.x2 = child_allocation.x1 + width;
+              child_allocation.x2 = box->x1 + (box->x2 - child_allocation.x1);
+              child_allocation.x1 = child_allocation.x2 - width;
             }
 
         }


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