Merge "DALi Version 1.0.37" into tizen
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Fri, 10 Apr 2015 14:52:11 +0000 (07:52 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 10 Apr 2015 14:52:11 +0000 (07:52 -0700)
dali-toolkit/internal/controls/buttons/button-impl.cpp

index c42531f..44878b6 100644 (file)
@@ -616,6 +616,11 @@ float Button::GetAnimationTime() const
 void Button::SetLabel( const std::string& label )
 {
   Toolkit::TextLabel textLabel = Toolkit::TextLabel::New( label );
+  textLabel.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
+  textLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
+  textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
+  textLabel.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true );
+
   SetLabel( textLabel );
 }