X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbuttons%2Fbutton-impl.cpp;h=4765f441db8e1f658c421455587bc04cb23d8f60;hp=0d3fcd572a2de6b752d2fe91de1ffb51fb93b873;hb=4b347781c8761d2909b235ded2e98d272fa9ac16;hpb=a41a75fa9679db6703affe8870af6e1eb6bcfc48 diff --git a/dali-toolkit/internal/controls/buttons/button-impl.cpp b/dali-toolkit/internal/controls/buttons/button-impl.cpp index 0d3fcd5..4765f44 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/button-impl.cpp @@ -19,6 +19,7 @@ #include "button-impl.h" // EXTERNAL INCLUDES +#include // for strcmp #include #include #include @@ -26,7 +27,7 @@ #include // INTERNAL INCLUDES -#include +#include /** * Button states and contents @@ -615,9 +616,13 @@ float Button::GetAnimationTime() const void Button::SetLabel( const std::string& label ) { - Toolkit::TextView textView = Toolkit::TextView::New( label ); - textView.SetWidthExceedPolicy( Toolkit::TextView::ShrinkToFit ); // Make sure our text always fits inside the button - SetLabel( textView ); + 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 ); } void Button::SetLabel( Actor label )