Fix compile errors after removing boost function include from dali-core
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / view / view-impl.cpp
index 3cb58ac..3b2ff0b 100644 (file)
@@ -19,6 +19,7 @@
 #include "view-impl.h"
 
 // EXTERNAL INCLUDES
+#include <cstring> // for strcmp
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/type-registry.h>
@@ -152,7 +153,8 @@ void View::SetBackground( ImageActor backgroundImage )
   }
 
   backgroundImage.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
-  backgroundImage.SetRelayoutEnabled( false );    // We will scale its size manually
+  backgroundImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
+  backgroundImage.SetSizeScalePolicy( FILL_WITH_ASPECT_RATIO );
   mBackgroundLayer.Add( backgroundImage );
 
   RelayoutRequest();
@@ -294,18 +296,6 @@ void View::OnInitialize()
   }
 }
 
-void View::OnRelayout( const Vector2& size, RelayoutContainer& container )
-{
-  if( mBackgroundLayer )
-  {
-    if( mBackgroundLayer && mBackgroundLayer.GetChildCount() > 0 )
-    {
-      Actor background = mBackgroundLayer.GetChildAt(0);
-      background.SetScale( FillXYKeepAspectRatio( Vector3( size.width, size.height, 1.0f ), background.GetTargetSize() ) );
-    }
-  }
-}
-
 View::Orientation View::DegreeToViewOrientation( Degree degree )
 {
   View::Orientation orientation = PORTRAIT;