childWidth = childLayout->GetMeasuredWidth();
}
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "LinearLayout::OnMeasure childWidth(%d)\n", childWidth.mValue );
- LayoutLength length = childWidth + LayoutLength::IntType( childMargin.start + childMargin.end );
+ DALI_LOG_STREAM( gLogFilter, Debug::Verbose, "LinearLayout::OnMeasure childWidth(" << childWidth << ")\n" );
+ LayoutLength length = childWidth + childMargin.start + childMargin.end;
LayoutLength cellPadding = i < GetChildCount() - 1 ? mCellPadding.width : 0;
if( isExactly )
{
LayoutLength childWidth = 0;
if( childWeight > 0 )
{
- LayoutLength share = (childWeight * remainingExcess.mValue) / remainingWeightSum;
+ LayoutLength share = ( childWeight * remainingExcess ) / remainingWeightSum;
remainingExcess -= share;
remainingWeightSum -= childWeight;
{
// Temporarily force children to reuse their old measured width
LayoutLength oldWidth = desiredWidth;
- childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, childLayout->GetMeasuredWidth().mValue );
+ childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, childLayout->GetMeasuredWidth().AsInteger() );
// Remeasure with new dimensions
MeasureChildWithMargins( childLayout, widthMeasureSpec, 0, uniformMeasureSpec, 0 );
- childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, oldWidth.mValue );
+ childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, oldWidth.AsInteger() );
}
}
}
case Dali::Toolkit::LinearLayout::Alignment::CENTER_HORIZONTAL:
{
// mTotalLength contains the padding already
- childLeft = LayoutLength( padding.start ) + ( right - left - mTotalLength ) / 2;
+ childLeft = padding.start + ( right - left - mTotalLength ) / 2.0f;
break;
}
}
childTop = height - padding.bottom - childHeight - childMargin.bottom;
break;
}
- case Dali::Toolkit::LinearLayout::Alignment::CENTER_VERTICAL:
+ case Dali::Toolkit::LinearLayout::Alignment::CENTER_VERTICAL: // FALLTHROUGH
default:
{
- childTop = LayoutLength( padding.top ) + ( ( childSpace - childHeight ) / 2 ) + childMargin.top - childMargin.bottom;
+ childTop = padding.top + ( ( childSpace - childHeight ) / 2.0f ) + childMargin.top - childMargin.bottom;
break;
}
}
childHeight = childLayout->GetMeasuredHeight();
}
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "LinearLayout::MeasureVertical childHeight(%d)\n", childHeight.mValue );
+ DALI_LOG_STREAM( gLogFilter, Debug::Verbose, "LinearLayout::MeasureVertical childHeight(" << childHeight << ")\n" );
- LayoutLength length = childHeight + LayoutLength::IntType( childMargin.top + childMargin.bottom );
+ LayoutLength length = childHeight + childMargin.top + childMargin.bottom;
LayoutLength cellPadding = i < GetChildCount() - 1 ? mCellPadding.height : 0;
LayoutLength totalLength = mTotalLength;
mTotalLength = std::max( totalLength, totalLength + length + cellPadding );
LayoutLength childHeight = 0;
if( childWeight > 0 )
{
- LayoutLength share = (childWeight * remainingExcess.mValue) / remainingWeightSum;
+ LayoutLength share = ( childWeight * remainingExcess ) / remainingWeightSum;
remainingExcess -= share;
remainingWeightSum -= childWeight;
alternativeMaxWidth = std::max( alternativeMaxWidth, matchWidthLocally ? marginWidth : childWidth );
childHeight = childLayout->GetMeasuredHeight();
- LayoutLength length = childHeight + LayoutLength::IntType( childMargin.top + childMargin.bottom );
+ LayoutLength length = childHeight + childMargin.top + childMargin.bottom;
LayoutLength cellPadding = i < GetChildCount() - 1 ? mCellPadding.height : 0;
LayoutLength totalLength = mTotalLength;
mTotalLength = std::max( totalLength, totalLength + length + cellPadding );
{
// Temporarily force children to reuse their old measured height
LayoutLength oldHeight = desiredHeight;
- childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, childLayout->GetMeasuredHeight().mValue );
+ childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, childLayout->GetMeasuredHeight().AsInteger() );
// Remeasure with new dimensions
MeasureChildWithMargins( childLayout, uniformMeasureSpec, 0, heightMeasureSpec, 0 );
- childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, oldHeight.mValue );
+ childOwner.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, oldHeight.AsInteger() );
}
}
}
default:
{
// mTotalLength contains the padding already
- childTop = LayoutLength( padding.top ) + ( bottom - top - mTotalLength ) / 2;
+ childTop = padding.top + ( bottom - top - mTotalLength ) / 2.0f;
break;
}
}
}
case Dali::Toolkit::LinearLayout::Alignment::CENTER_HORIZONTAL:
{
- childLeft = LayoutLength( padding.start ) + ( childSpace - childWidth ) / 2 + childMargin.start - childMargin.end;
+ childLeft = padding.start + ( childSpace - childWidth ) / 2.0f + childMargin.start - childMargin.end;
break;
}
}