From: Jiyun Yang Date: Thu, 22 Nov 2018 06:12:47 +0000 (+0900) Subject: [Tizen] Modify codes for Dali Windows backend X-Git-Tag: submit/tizen/20181122.072335~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb346f8952c39c70b78d9f8e8f420b57458f3c6c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Modify codes for Dali Windows backend This reverts commit bf1e4dc104639d534459adbb2412c7ee6f20cb45. Change-Id: I90dd6b89f5b0020559f57eef36006935c3853b49 --- diff --git a/dali-toolkit/devel-api/layouting/layout-group-impl.cpp b/dali-toolkit/devel-api/layouting/layout-group-impl.cpp old mode 100644 new mode 100755 diff --git a/dali-toolkit/internal/layouting/flex-layout-impl.cpp b/dali-toolkit/internal/layouting/flex-layout-impl.cpp old mode 100644 new mode 100755 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 b077f54..81ed9e3 --- a/dali-toolkit/internal/layouting/linear-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/linear-layout-impl.cpp @@ -519,12 +519,12 @@ void LinearLayout::LayoutHorizontal( LayoutLength left, LayoutLength top, Layout { case Dali::Toolkit::LinearLayout::Alignment::TOP: { - childTop = LayoutLength( padding.top ) + childMargin.top; + childTop = LayoutLength( padding.top ) + LayoutLength( childMargin.top ); break; } case Dali::Toolkit::LinearLayout::Alignment::BOTTOM: { - childTop = height - padding.bottom - childHeight - childMargin.bottom; + childTop = height - LayoutLength( padding.bottom ) - childHeight - LayoutLength( childMargin.bottom ); break; } case Dali::Toolkit::LinearLayout::Alignment::CENTER_VERTICAL: // FALLTHROUGH @@ -536,7 +536,7 @@ void LinearLayout::LayoutHorizontal( LayoutLength left, LayoutLength top, Layout } childLeft += childMargin.start; childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childLeft += childWidth + childMargin.end + mCellPadding.width; + childLeft += childWidth + LayoutLength( childMargin.end ) + mCellPadding.width; } } } @@ -588,7 +588,7 @@ void LinearLayout::MeasureVertical( MeasureSpec widthMeasureSpec, MeasureSpec he if( isExactly && useExcessSpace ) { LayoutLength totalLength = mTotalLength; - mTotalLength = std::max( totalLength, totalLength + childMargin.top + childMargin.bottom ); + mTotalLength = std::max( totalLength, totalLength + LayoutLength( childMargin.top ) + LayoutLength( childMargin.bottom ) ); } else { @@ -850,12 +850,12 @@ void LinearLayout::LayoutVertical( LayoutLength left, LayoutLength top, LayoutLe case Dali::Toolkit::LinearLayout::Alignment::BEGIN: default: { - childLeft = LayoutLength( padding.start ) + childMargin.start; + childLeft = LayoutLength( padding.start ) + LayoutLength( childMargin.start ); break; } case Dali::Toolkit::LinearLayout::Alignment::END: { - childLeft = width - padding.end - childWidth - childMargin.end; + childLeft = width - LayoutLength( padding.end ) - childWidth - LayoutLength( childMargin.end ); break; } case Dali::Toolkit::LinearLayout::Alignment::CENTER_HORIZONTAL: @@ -865,7 +865,7 @@ void LinearLayout::LayoutVertical( LayoutLength left, LayoutLength top, LayoutLe } } childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childTop += childHeight + childMargin.bottom + mCellPadding.height; + childTop += childHeight + LayoutLength( childMargin.bottom ) + mCellPadding.height; } } } diff --git a/dali-toolkit/internal/layouting/vbox-layout-impl.cpp b/dali-toolkit/internal/layouting/vbox-layout-impl.cpp old mode 100644 new mode 100755 index 22fba16..9d50bda --- a/dali-toolkit/internal/layouting/vbox-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/vbox-layout-impl.cpp @@ -233,7 +233,7 @@ void VboxLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, La auto width = right - left; // Space available for child - auto childSpace = width - padding.start - padding.end; + auto childSpace = width - LayoutLength( padding.start ) - LayoutLength( padding.end ); auto count = GetChildCount(); for( unsigned int childIndex = 0; childIndex < count; childIndex++) @@ -248,10 +248,10 @@ void VboxLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, La auto childMargin = childLayout->GetMargin(); childTop += childMargin.top; - childLeft = ( childSpace - childWidth ) / 2 + childMargin.start - childMargin.end; + childLeft = ( childSpace - childWidth ) / 2 + LayoutLength( childMargin.start ) - LayoutLength( childMargin.end ); childLayout->Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight ); - childTop += childHeight + childMargin.bottom + mCellPadding.height; + childTop += childHeight + LayoutLength( childMargin.bottom ) + mCellPadding.height; } } }