Commit 4b757eabdf1d6d231f9a24ada74876ba59944994
1 parent
6ee0b53e
Fixes required after https://review.tizen.org/gerrit/#/c/189231/
Change-Id: I77dc515ca94e8c19c5fb0953d9cad3e8bca5d8bf
Showing
1 changed file
with
11 additions
and
11 deletions
examples/simple-layout/custom-layout-impl.cpp
| @@ -37,8 +37,8 @@ CustomLayoutPtr CustomLayout::New() | @@ -37,8 +37,8 @@ CustomLayoutPtr CustomLayout::New() | ||
| 37 | 37 | ||
| 38 | void CustomLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeasureSpec ) | 38 | void CustomLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeasureSpec ) |
| 39 | { | 39 | { |
| 40 | - auto accumulatedWidth = 0; | ||
| 41 | - auto maxHeight = 0; | 40 | + LayoutLength accumulatedWidth = 0; |
| 41 | + LayoutLength maxHeight = 0; | ||
| 42 | 42 | ||
| 43 | // In this layout we will: | 43 | // In this layout we will: |
| 44 | // Measuring the layout with the children in a horizontal configuration, one after another | 44 | // Measuring the layout with the children in a horizontal configuration, one after another |
| @@ -52,7 +52,7 @@ void CustomLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMe | @@ -52,7 +52,7 @@ void CustomLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMe | ||
| 52 | { | 52 | { |
| 53 | MeasureChild( childLayout, widthMeasureSpec, heightMeasureSpec ); | 53 | MeasureChild( childLayout, widthMeasureSpec, heightMeasureSpec ); |
| 54 | accumulatedWidth += childLayout->GetMeasuredWidth(); | 54 | accumulatedWidth += childLayout->GetMeasuredWidth(); |
| 55 | - std::max( childLayout->GetMeasuredHeight().mValue, maxHeight ); | 55 | + std::max( childLayout->GetMeasuredHeight(), maxHeight ); |
| 56 | } | 56 | } |
| 57 | } | 57 | } |
| 58 | 58 | ||
| @@ -66,14 +66,14 @@ void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, | @@ -66,14 +66,14 @@ void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, | ||
| 66 | LayoutLength childLeft( 0 ); | 66 | LayoutLength childLeft( 0 ); |
| 67 | 67 | ||
| 68 | // We want to vertically align the children to the middle | 68 | // We want to vertically align the children to the middle |
| 69 | - auto height = bottom - top; | ||
| 70 | - auto middle = height / 2; | 69 | + LayoutLength height = bottom - top; |
| 70 | + LayoutLength middle = height / 2; | ||
| 71 | 71 | ||
| 72 | // Horizontally align the children to the middle of the space they are given too | 72 | // Horizontally align the children to the middle of the space they are given too |
| 73 | - auto width = right - left; | 73 | + LayoutLength width = right - left; |
| 74 | int count = GetChildCount(); | 74 | int count = GetChildCount(); |
| 75 | - auto childIncrement = width / count; | ||
| 76 | - auto center = childIncrement / 2; | 75 | + LayoutLength childIncrement = width / count; |
| 76 | + LayoutLength center = childIncrement / 2; | ||
| 77 | 77 | ||
| 78 | // Check layout direction | 78 | // Check layout direction |
| 79 | auto owner = GetOwner(); | 79 | auto owner = GetOwner(); |
| @@ -87,12 +87,12 @@ void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, | @@ -87,12 +87,12 @@ void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, | ||
| 87 | Dali::Toolkit::Internal::LayoutItemPtr childLayout = GetChildAt( itemIndex ); | 87 | Dali::Toolkit::Internal::LayoutItemPtr childLayout = GetChildAt( itemIndex ); |
| 88 | if( childLayout != nullptr ) | 88 | if( childLayout != nullptr ) |
| 89 | { | 89 | { |
| 90 | - auto childWidth = childLayout->GetMeasuredWidth(); | ||
| 91 | - auto childHeight = childLayout->GetMeasuredHeight(); | 90 | + LayoutLength childWidth = childLayout->GetMeasuredWidth(); |
| 91 | + LayoutLength childHeight = childLayout->GetMeasuredHeight(); | ||
| 92 | 92 | ||
| 93 | childTop = middle - (childHeight / 2); | 93 | childTop = middle - (childHeight / 2); |
| 94 | 94 | ||
| 95 | - auto left = childLeft + center - childWidth / 2; | 95 | + LayoutLength left = childLeft + center - childWidth / 2; |
| 96 | 96 | ||
| 97 | childLayout->Layout( left, childTop, left + childWidth, childTop + childHeight ); | 97 | childLayout->Layout( left, childTop, left + childWidth, childTop + childHeight ); |
| 98 | childLeft += childIncrement; | 98 | childLeft += childIncrement; |