X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Flayouting%2Flinear-layout-impl.cpp;h=b7b05a7909eaaaf96df60f49ed7d1104f6490374;hb=refs%2Ftags%2Fsubmit%2Ftizen%2F20180709.075208;hp=7b3720c08e9184c21d9a07ccbda3dce1402ceb8d;hpb=b701946569ddf650fb3a4eb410bbb8a6737fa167;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..b7b05a7 --- a/dali-toolkit/internal/layouting/linear-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/linear-layout-impl.cpp @@ -280,7 +280,7 @@ void LinearLayout::LayoutHorizontal( LayoutLength left, LayoutLength top, Layout 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; } } } @@ -440,7 +440,7 @@ void LinearLayout::LayoutVertical( LayoutLength left, LayoutLength top, LayoutLe 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 = ( childSpace - childWidth ) / 2 + (int)childMargin.start - (int)childMargin.end; childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childTop += childHeight + childMargin.bottom + mCellPadding.height; + childTop += childHeight + (int)childMargin.bottom + mCellPadding.height; } } }