From 9fa3c16a347424c75ac106c9b1e8e2361f27d835 Mon Sep 17 00:00:00 2001 From: raster Date: Thu, 26 May 2011 05:40:47 +0000 Subject: [PATCH] fix table to handle weighting correctly for expands vs not expands. if ANY elemtn that spans a col or row CANt expand that column or row is VETOED frome xpanding, as opposed to the inverse git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59687 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_table.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/canvas/evas_object_table.c b/src/lib/canvas/evas_object_table.c index 6437b1f..c4d34fa 100644 --- a/src/lib/canvas/evas_object_table.c +++ b/src/lib/canvas/evas_object_table.c @@ -521,8 +521,10 @@ _evas_object_table_count_expands(const Eina_Bool *expands, int start, int end) int count = 0; for (; itr < itr_end; itr++) - if (*itr) - count++; + { + if (*itr) + count++; + } return count; } @@ -598,6 +600,8 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat _evas_object_table_cache_reset(priv); /* cache interesting data */ + memset(c->expands.h, 1, priv->size.cols); + memset(c->expands.v, 1, priv->size.rows); EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Object *child = opt->obj; @@ -635,10 +639,10 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Dat opt->fill_v = 1; } - if (opt->expand_h) - memset(c->expands.h + opt->col, 1, opt->colspan); - if (opt->expand_v) - memset(c->expands.v + opt->row, 1, opt->rowspan); + if (!opt->expand_h) + memset(c->expands.h + opt->col, 0, opt->colspan); + if (!opt->expand_v) + memset(c->expands.v + opt->row, 0, opt->rowspan); } /* calculate sizes for each row and column */ -- 2.7.4