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=b9232952388979d771abbf6a53a0d419a41140e4;hp=f8b0fb295bc67871ec86ef766d9f02675b50b901;hb=e9d852fcdacc5788785bfe0b617bd757794e8208;hpb=18644a10e91e667563734dfa9fa8be6b85ffdc51 diff --git a/dali-toolkit/internal/controls/buttons/button-impl.cpp b/dali-toolkit/internal/controls/buttons/button-impl.cpp index f8b0fb2..b923295 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/button-impl.cpp @@ -24,11 +24,9 @@ #include #include #include -#include #include // INTERNAL INCLUDES -#include #include #include @@ -541,7 +539,9 @@ void Button::SetUnselectedColor( const Vector4& color ) else { // If there is no existing content, create a new actor to use for flat color. - SetupContent( mUnselectedContent, CreateSolidColorActor( mUnselectedColor ) ); + Toolkit::Control unselectedContentActor = Toolkit::Control::New(); + unselectedContentActor.SetBackgroundColor( mUnselectedColor ); + SetupContent( mUnselectedContent, unselectedContentActor ); mUnselectedContent.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); } } @@ -563,7 +563,9 @@ void Button::SetSelectedColor( const Vector4& color ) else { // If there is no existing content, create a new actor to use for flat color. - SetupContent( mSelectedContent, CreateSolidColorActor( mSelectedColor ) ); + Toolkit::Control selectedContentActor = Toolkit::Control::New(); + selectedContentActor.SetBackgroundColor( mSelectedColor ); + SetupContent( mSelectedContent, selectedContentActor ); mSelectedContent.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); } } @@ -1047,10 +1049,12 @@ bool Button::OnKeyboardEnter() return ret; } -void Button::OnControlStageDisconnection() +void Button::OnStageDisconnection() { OnButtonStageDisconnection(); // Notification for derived classes. mState = ButtonUp; + + Control::OnStageDisconnection(); } void Button::OnTap(Actor actor, const TapGesture& tap)