// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/public-api/object/property-map.h>
+#include <dali/public-api/images/resource-image.h>
// 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
{
{
DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetButtonImage() is deprecated and will be removed from next release. Use Styling file instead.\n" );
- Actor imageView = Toolkit::ImageView::New( image );
- imageView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- Dali::Toolkit::GetImplementation( *this ).SetButtonImage( imageView );
+ 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" );
- Actor imageView = Toolkit::ImageView::New( image );
- imageView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( imageView );
+ Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
}
Actor Button::GetButtonImage() const
return Dali::Toolkit::GetImplementation( *this ).GetSelectedImage();
}
-
Button::Button( Internal::Button& implementation )
: Control( implementation )
{