Commit 4882639ded20a2b1f41fa63b1d68950f9f918e6d

Authored by Adeel Kazmi
Committed by Gerrit Code Review
2 parents 3604308e fbae41e2

Merge "Updates needed after encapsulation and harmonizing operators for LayoutLe…

…ngth" into devel/master
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  
... ...