From 49028c599a6fb2e42f8c199e08714da637e7f7fe Mon Sep 17 00:00:00 2001 From: Jee-Yong Um Date: Mon, 19 Oct 2015 11:01:22 -0700 Subject: [PATCH] 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 --- 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 5a4cfcbdde..0c8ea11d0a 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);