summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_table.c
diff options
context:
space:
mode:
authorJee-Yong Um <jc9.um@samsung.com>2015-10-19 11:01:22 -0700
committerCedric BAIL <cedric@osg.samsung.com>2015-10-19 11:01:23 -0700
commit49028c599a6fb2e42f8c199e08714da637e7f7fe (patch)
tree5b8850ce5b03c0c5f3a728babef6bf7f98938f13 /src/lib/evas/canvas/evas_object_table.c
parent2d52eedf0655173926db69f89ab86965bc08e98d (diff)
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 <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/evas/canvas/evas_object_table.c')
-rw-r--r--src/lib/evas/canvas/evas_object_table.c6
1 files 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
841 841
842 cx = x + opt->col * (priv->pad.h); 842 cx = x + opt->col * (priv->pad.h);
843 cx += _evas_object_table_sum_sizes(cols, 0, opt->col); 843 cx += _evas_object_table_sum_sizes(cols, 0, opt->col);
844 cw = _evas_object_table_sum_sizes(cols, opt->col, opt->end_col); 844 cw = (opt->colspan - 1) * priv->pad.h;
845 cw += _evas_object_table_sum_sizes(cols, opt->col, opt->end_col);
845 846
846 cy = y + opt->row * (priv->pad.v); 847 cy = y + opt->row * (priv->pad.v);
847 cy += _evas_object_table_sum_sizes(rows, 0, opt->row); 848 cy += _evas_object_table_sum_sizes(rows, 0, opt->row);
848 ch = _evas_object_table_sum_sizes(rows, opt->row, opt->end_row); 849 ch = (opt->rowspan - 1) * priv->pad.v;
850 ch += _evas_object_table_sum_sizes(rows, opt->row, opt->end_row);
849 851
850 _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch); 852 _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch);
851 853