Gengrid: improve item_region_show code
authorDave Andreoli <dave@gurumeditation.it>
Sun, 17 Jan 2016 14:11:29 +0000 (15:11 +0100)
committerDave Andreoli <dave@gurumeditation.it>
Sun, 17 Jan 2016 14:11:29 +0000 (15:11 +0100)
commit16b16b71282ee6b0115c5db3e714ec934249e771
tree645f74e24323f56204733fd366b8df1406fac0ff
parentdf74a349422c287a0f3043a67974e38ff1952222
Gengrid: improve item_region_show code

There is no need to recalc row and col position of the item, they are already stored in the item struct.

The old implementation was calculating wrong values and also was storing this wrong values in it->x and it->y, resulting in wrong results for the elm_gengrid_item_pos_get() function.

so, at the end,  this is a @fix for the pos_get() function.

Also changed a bit the test to let the gengrid fill the window and thus testing behaviour on col/row changes.

I didn't find any regression in all the gengrid tests after this, let me know if it broke something for you.
legacy/elementary/src/bin/test_gengrid.c
legacy/elementary/src/lib/elm_gengrid.c