Fix a popup position error caused by SetInheritPosition() change
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / button.cpp
index 9f02049..52ebd8f 100644 (file)
@@ -26,6 +26,7 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/buttons/button-impl.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 
 namespace Dali
 {
@@ -96,7 +97,7 @@ void Button::SetInitialAutoRepeatingDelay( float initialAutoRepeatingDelay )
 
 float Button::GetInitialAutoRepeatingDelay() const
 {
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetPositionInheritanceMode() is deprecated and will be removed from next release. Use GetProperty INITIAL_AUTO_REPEATING_DELAY or Styling file instead.\n" );
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetInitialAutoRepeatingDelay() is deprecated and will be removed from next release. Use GetProperty INITIAL_AUTO_REPEATING_DELAY or Styling file instead.\n" );
 
   return Dali::Toolkit::GetImplementation( *this ).GetInitialAutoRepeatingDelay();
 }
@@ -253,32 +254,14 @@ void Button::SetButtonImage( Image image )
 {
   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetButtonImage() is deprecated and will be removed from next release. Use Styling file instead.\n" );
 
-  Dali::ResourceImage resourceImage = Dali::ResourceImage::DownCast( image );
-
-  std::string imageUrl;
-
-  if ( resourceImage )
-  {
-    imageUrl = resourceImage.GetUrl();
-  }
-
-  Dali::Toolkit::GetImplementation( *this ).SetUnselectedImage( imageUrl );
+  Dali::Toolkit::GetImplementation( *this ).SetButtonImage( image );
 }
 
 void Button::SetSelectedImage( Image image )
 {
   DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetSelectedImage() is deprecated and will be removed from next release. Use Styling file instead.\n" );
 
-  Dali::ResourceImage resourceImage = Dali::ResourceImage::DownCast( image );
-
-  std::string imageUrl;
-
-  if ( resourceImage )
-  {
-    imageUrl = resourceImage.GetUrl();
-  }
-
-  Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( imageUrl );
+  Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
 }
 
 Actor Button::GetButtonImage() const