Commit fbae41e2de9a29e00532cdefc28098781ad99c86

Authored by Kimmo Hoikka
Committed by Agnelo Vaz
1 parent dbf8396b

Updates needed after encapsulation and harmonizing operators for LayoutLength

https://review.tizen.org/gerrit/#/c/189675/

Change-Id: Ib85562d7ddafcdc938ec766f3fee3b1ca4befb49
examples/simple-layout/custom-layout-impl.cpp
... ... @@ -66,8 +66,7 @@ void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top,
66 66 LayoutLength childLeft( 0 );
67 67  
68 68 // We want to vertically align the children to the middle
69   - LayoutLength height = bottom - top;
70   - LayoutLength middle = height / 2;
  69 + LayoutLength middle = (bottom - top) / 2;
71 70  
72 71 // Horizontally align the children to the middle of the space they are given too
73 72 LayoutLength width = right - left;
... ... @@ -90,7 +89,7 @@ void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top,
90 89 LayoutLength childWidth = childLayout->GetMeasuredWidth();
91 90 LayoutLength childHeight = childLayout->GetMeasuredHeight();
92 91  
93   - childTop = middle - (childHeight / 2);
  92 + childTop = middle - childHeight / 2;
94 93  
95 94 LayoutLength left = childLeft + center - childWidth / 2;
96 95  
... ...