X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Flayouting%2Flinear-layout-impl.cpp;h=f989a541801a786f63b16636fafd26f260af6751;hb=56a9f0862566dfb88e0f0266c211ca9766e9bf49;hp=7b3720c08e9184c21d9a07ccbda3dce1402ceb8d;hpb=6fee26dbd74ddc1b9e3319721948a54c791df4da;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 index 7b3720c..f989a54 100644 --- a/dali-toolkit/internal/layouting/linear-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/linear-layout-impl.cpp @@ -273,7 +273,7 @@ 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 @@ -433,7 +433,7 @@ 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 @@ -453,7 +453,7 @@ 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;