Remove use of deprecated Control flag REQUIRES_STYLE_CHANGE_SIGNALS
[platform/core/uifw/dali-demo.git] / examples / transitions / shadow-button-impl.cpp
index c0117d0..51867d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -80,7 +80,7 @@ Toolkit::TransitionData ConvertPropertyToTransition( const Property::Value& valu
 
 
 Internal::ShadowButton::ShadowButton()
-: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
   mCheckState(false),
   mActiveState(false)
 {
@@ -123,7 +123,7 @@ void ShadowButton::SetCheckState( bool checkState )
 {
   mCheckState = checkState;
   DevelControl::EnableVisual( *this, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, true );
-  if( Self().OnStage() )
+  if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     if( checkState )
     {
@@ -201,14 +201,14 @@ void ShadowButton::OnInitialize()
   Actor self = Self();
 }
 
-void ShadowButton::OnStageConnection( int depth )
+void ShadowButton::OnSceneConnection( int depth )
 {
-  Control::OnStageConnection( depth );
+  Control::OnSceneConnection( depth );
 }
 
-void ShadowButton::OnStageDisconnection()
+void ShadowButton::OnSceneDisconnection()
 {
-  Control::OnStageDisconnection();
+  Control::OnSceneDisconnection();
 }
 
 void ShadowButton::OnSizeSet( const Vector3& targetSize )