X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Flayouting%2Flinear-layout-impl.cpp;h=64bee8c214006009d4f9667aa365fb26349e43ad;hb=20125e47f9f183b0d39972ada01280da8984d942;hp=7b3720c08e9184c21d9a07ccbda3dce1402ceb8d;hpb=94464655944de025a2c22b237868e45aea45b139;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/layouting/linear-layout-impl.cpp b/dali-toolkit/internal/layouting/linear-layout-impl.cpp old mode 100644 new mode 100755 index 7b3720c..64bee8c --- a/dali-toolkit/internal/layouting/linear-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/linear-layout-impl.cpp @@ -273,14 +273,14 @@ void LinearLayout::LayoutHorizontal( LayoutLength left, LayoutLength top, Layout Extents padding = GetPadding(); - LayoutLength childTop( 0 ); + LayoutLength childTop( padding.top ); LayoutLength childLeft( padding.start ); // Where bottom of child should go auto height = bottom - top; // Space available for child - auto childSpace = height - padding.top - padding.bottom; + auto childSpace = height - (int)padding.top - (int)padding.bottom; auto count = GetChildCount(); @@ -305,11 +305,11 @@ void LinearLayout::LayoutHorizontal( LayoutLength left, LayoutLength top, Layout auto childHeight = childLayout->GetMeasuredHeight(); auto childMargin = childLayout->GetMargin(); - childTop = LayoutLength(padding.top) + ((childSpace - childHeight) / 2) + childMargin.top - childMargin.bottom; + childTop = LayoutLength(padding.top) + (int)((childSpace - childHeight) / 2) + (int)childMargin.top - (int)childMargin.bottom; childLeft += childMargin.start; childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childLeft += childWidth + childMargin.end + mCellPadding.width; + childLeft += childWidth + (int)childMargin.end + mCellPadding.width; } } } @@ -433,14 +433,14 @@ void LinearLayout::LayoutVertical( LayoutLength left, LayoutLength top, LayoutLe { Extents padding = GetPadding(); - LayoutLength childTop( 0 ); + LayoutLength childTop( padding.top ); LayoutLength childLeft( padding.start ); // Where bottom of child should go auto width = right - left; // Space available for child - auto childSpace = width - padding.start - padding.end; + auto childSpace = width - (int)padding.start - (int)padding.end; auto count = GetChildCount(); for( unsigned int childIndex = 0; childIndex < count; childIndex++) @@ -453,10 +453,10 @@ void LinearLayout::LayoutVertical( LayoutLength left, LayoutLength top, LayoutLe auto childMargin = childLayout->GetMargin(); childTop += childMargin.top; - childLeft = ( childSpace - childWidth ) / 2 + childMargin.start - childMargin.end; + childLeft = LayoutLength( padding.start ) + ( childSpace - childWidth ) / 2 + childMargin.start - childMargin.end; childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childTop += childHeight + childMargin.bottom + mCellPadding.height; + childTop += childHeight + (int)childMargin.bottom + mCellPadding.height; } } }