Control impl layout code for Margin removed
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / layouting / vbox-layout-impl.cpp
index 56fb230..22fba16 100644 (file)
@@ -17,7 +17,6 @@
 //CLASS HEADER
 #include <dali-toolkit/internal/layouting/vbox-layout-impl.h>
 
-//EXTERNAL HEADERS
 //INTERNAL HEADERS
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/common/extents.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
 
-
+namespace
+{
 #if defined(DEBUG_ENABLED)
-static Debug::Filter* gLogFilter = Debug::Filter::New( Debug::Concise, false, "LOG_LAYOUT" );
+static Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_LAYOUT" );
 #endif
+}
 
 namespace Dali
 {
@@ -132,7 +133,8 @@ void VboxLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeas
 
       MeasureChildWithMargins( childLayout, widthMeasureSpec, 0, heightMeasureSpec, 0 );
       auto childHeight = childLayout->GetMeasuredHeight();
-      auto childMargin = childOwner.GetProperty<Extents>( Toolkit::LayoutGroup::ChildProperty::MARGIN_SPECIFICATION );
+      auto childMargin = childLayout->GetMargin();
+
       auto length = childHeight + LayoutLength::IntType(childMargin.top + childMargin.bottom );
 
       auto cellPadding = i<GetChildCount()-1 ? mCellPadding.height : 0;
@@ -165,7 +167,6 @@ void VboxLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeas
       alternativeMaxWidth = std::max( alternativeMaxWidth, matchWidthLocally ? marginWidth : childWidth );
     }
   }
-
   Extents padding = GetPadding();
   mTotalLength += padding.top + padding.bottom;
   auto heightSize = mTotalLength;
@@ -223,7 +224,6 @@ void VboxLayout::ForceUniformWidth( int count, MeasureSpec heightMeasureSpec )
 
 void VboxLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom )
 {
-  auto owner = GetOwner();
   Extents padding = GetPadding();
 
   LayoutLength childTop( 0 );
@@ -245,7 +245,7 @@ void VboxLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top, La
       auto childHeight = childLayout->GetMeasuredHeight();
 
       auto childOwner = childLayout->GetOwner();
-      auto childMargin = childOwner.GetProperty<Extents>( Toolkit::LayoutGroup::ChildProperty::MARGIN_SPECIFICATION );
+      auto childMargin = childLayout->GetMargin();
 
       childTop += childMargin.top;
       childLeft = ( childSpace - childWidth ) / 2 + childMargin.start - childMargin.end;