Fix compile errors after removing boost function include from dali-core
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / popup / popup-impl.cpp
index 23df7aa..42fac71 100755 (executable)
@@ -19,6 +19,7 @@
 #include <dali-toolkit/internal/controls/popup/popup-impl.h>
 
 // EXTERNAL INCLUDES
+#include <cstring> // for strcmp
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/public-api/adaptor-framework/physical-keyboard.h>
 #include <dali/public-api/animation/constraints.h>
@@ -223,11 +224,10 @@ void Popup::SetBackgroundImage( Actor image )
   // OnDialogTouched only consume the event. It prevents the touch event to be caught by the backing.
   mBackgroundImage.TouchedSignal().Connect( this, &Popup::OnDialogTouched );
 
-  mBackgroundImage.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
+  mBackgroundImage.SetResizePolicy( SIZE_FIXED_OFFSET_FROM_PARENT, ALL_DIMENSIONS );
   mBackgroundImage.SetAnchorPoint( AnchorPoint::CENTER );
   mBackgroundImage.SetParentOrigin( ParentOrigin::CENTER );
 
-  mBackgroundImage.SetSizeMode( SIZE_FIXED_OFFSET_FROM_PARENT );
   Vector3 border( mPopupStyle->backgroundOuterBorder.x, mPopupStyle->backgroundOuterBorder.z, 0.0f );
   mBackgroundImage.SetSizeModeFactor( border );
 
@@ -271,13 +271,14 @@ void Popup::SetTitle( const std::string& text )
 
   mTitle = Toolkit::TextLabel::New( text );
   mTitle.SetName( "POPUP_TITLE" );
-  mTitle.SetColor( Color::BLACK );
+  mTitle.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true );
+  mTitle.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
 
   if( mPopupLayout )
   {
     mTitle.SetPadding( Padding( 0.0f, 0.0f, mPopupStyle->margin, mPopupStyle->margin ) );
     mTitle.SetResizePolicy( FILL_TO_PARENT, WIDTH );
-    mTitle.SetDimensionDependency( HEIGHT, WIDTH ); // HeightForWidth
+    mTitle.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
     mPopupLayout.AddChild( mTitle, Toolkit::TableView::CellPosition( 0, 0 ) );
   }