jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7ba0707851f72072e0d077984c5b6203d9dd6623

commit 7ba0707851f72072e0d077984c5b6203d9dd6623
Author: Jeeyong Um <con...@gmail.com>
Date:   Wed Apr 19 16:47:39 2017 +0900

    Evas.Table: Apply mirrored correctly when align is set
    
    Summary:
    When table items are left aligned and mirrored is set, items should be 
placed
    from the right side, but align is not changed. (still left-aligned)
    
    @fix
    
    Test Plan: make and run attached example
    
    Reviewers: cedric, jpeg
    
    Subscribers: thiepha, woohyun
    
    Differential Revision: https://phab.enlightenment.org/D4758
---
 src/lib/evas/canvas/evas_object_table.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_table.c 
b/src/lib/evas/canvas/evas_object_table.c
index 820e8d2..103d3a8 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -785,12 +785,14 @@ _evas_object_table_calculate_layout_regular(Evas_Object 
*o, Evas_Table_Data *pri
    Eina_List *l;
    Evas_Coord *cols = NULL, *rows = NULL;
    Evas_Coord x, y, w, h;
+   Evas_Coord totw;
 
    c = priv->cache;
    if (!c) return;
 
    c->ref++;
    evas_object_geometry_get(o, &x, &y, &w, &h);
+   totw = w;
 
    /* handle horizontal */
    if ((c->total.expands.h <= 0) || (c->total.min.w >= w))
@@ -857,7 +859,7 @@ _evas_object_table_calculate_layout_regular(Evas_Object *o, 
Evas_Table_Data *pri
 
         if (priv->is_mirrored)
           {
-             evas_object_move(opt->obj, x + w - (cx - x + cw), cy);
+             evas_object_move(opt->obj, x + w + 2 * (0.5 - priv->align.h) * 
(totw - w) - (cx - x + cw), cy);
           }
         else
           {

-- 


Reply via email to