evas_box: fix children size and position calculation when padding is used for horizon...
authorSubodh Kumar <s7158.kumar@samsung.com>
Sun, 4 Oct 2015 13:23:49 +0000 (15:23 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Sun, 4 Oct 2015 14:22:49 +0000 (16:22 +0200)
commit4290567fd67cee39a3e36fddf0dc526190250724
tree0c55f871bd276563e70b7e357248a5ae597bc0c3
parenta4c588b1e40c8a68348d14a2c82f601847bdbb5c
evas_box: fix children size and position calculation when padding is used for horizontal flow layout

Summary:
Fix children size and position calculation when padding is used

For each child size calculation padding is adjusted
but box height should include  padding.
Secondly, x and y position of children should not  include
the vertical and horizonatal padding as child size has already
included the given paddings.

@fix

Test Plan:
Please modify test_box.c file in
function test_box_vert2 as follows:

   bx = elm_box_add(win);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bx);
   elm_box_padding_set(bx, 50, 50);
   elm_box_layout_set(bx, evas_object_box_layout_flow_horizontal, NULL, NULL);
   evas_object_show(bx);

Now,
1. open elementary_test
2. box
3. Box vert 2 (observe box is broken)
4. Try resizing the window (observe)

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3049

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/evas/canvas/evas_object_box.c