cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=49028c599a6fb2e42f8c199e08714da637e7f7fe

commit 49028c599a6fb2e42f8c199e08714da637e7f7fe
Author: Jee-Yong Um <jc9...@samsung.com>
Date:   Mon Oct 19 11:01:22 2015 -0700

    evas table: fix miscalcuation in cells with span and padding
    
    Summary:
    In evas table that homogeneous mode is turned off,
    the size of items in cells, whose rowspan or colspan is larger than 1
    and horizontal or vertical padding exists, are miscalculatd.
    
    T2655
    
    @fix
    
    Test Plan: elementary_test "Table Padding"
    
    Reviewers: Hermet, cedric
    
    Subscribers: cedric, DaveMDS, Hermet
    
    Differential Revision: https://phab.enlightenment.org/D3192
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/evas/canvas/evas_object_table.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_table.c 
b/src/lib/evas/canvas/evas_object_table.c
index 5a4cfcb..0c8ea11 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -841,11 +841,13 @@ _evas_object_table_calculate_layout_regular(Evas_Object 
*o, Evas_Table_Data *pri
 
         cx = x + opt->col * (priv->pad.h);
         cx += _evas_object_table_sum_sizes(cols, 0, opt->col);
-        cw = _evas_object_table_sum_sizes(cols, opt->col, opt->end_col);
+        cw = (opt->colspan - 1) * priv->pad.h;
+        cw += _evas_object_table_sum_sizes(cols, opt->col, opt->end_col);
 
         cy = y + opt->row * (priv->pad.v);
         cy += _evas_object_table_sum_sizes(rows, 0, opt->row);
-        ch = _evas_object_table_sum_sizes(rows, opt->row, opt->end_row);
+        ch = (opt->rowspan - 1) * priv->pad.v;
+        ch += _evas_object_table_sum_sizes(rows, opt->row, opt->end_row);
 
         _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch);
 

-- 


Reply via email to