X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fimage-view%2Fimage-view-impl.cpp;h=cb2dc9902e5401999addb0c8731a7877cdb1bb15;hb=a4fa71ebecb9ed103fa3e64004e99b728f9190c2;hp=085d522f393a2feb677ae083ffa36279b5e71971;hpb=d402b997c5874a73bfec576eff290af235c1c03d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp old mode 100755 new mode 100644 index 085d522..cb2dc99 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp @@ -19,7 +19,6 @@ #include "image-view-impl.h" // EXTERNAL INCLUDES -#include #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include namespace Dali { @@ -54,7 +54,6 @@ BaseHandle Create() // Setup properties, signals and actions using the type-registry. DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ImageView, Toolkit::Control, Create ); -DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "reservedProperty01", STRING, RESERVED_PROPERTY_01 ) DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "image", MAP, IMAGE ) DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "preMultipliedAlpha", BOOLEAN, PRE_MULTIPLIED_ALPHA ) @@ -97,6 +96,15 @@ void ImageView::OnInitialize() // ImageView can relayout in the OnImageReady, alternative to a signal would be to have a upcall from the Control to ImageView Dali::Toolkit::Control handle( GetOwner() ); handle.ResourceReadySignal().Connect( this, &ImageView::OnResourceReady ); + + DevelControl::SetAccessibilityConstructor( Self(), []( Dali::Actor actor ) { + return std::unique_ptr< Dali::Accessibility::Accessible >( + new Control::Impl::AccessibleImpl( actor, Dali::Accessibility::Role::IMAGE ) ); + } ); + + //Enable highightability + Self().SetProperty( Toolkit::DevelControl::Property::ACCESSIBILITY_HIGHLIGHTABLE, true ); + } void ImageView::SetImage( const Property::Map& map ) @@ -274,11 +282,12 @@ void ImageView::OnRelayout( const Vector2& size, RelayoutContainer& container ) mVisual.SetTransformAndSize( transformMap, size ); // mVisual is not updated util the resource is ready in the case of visual replacement. - // So apply the transform and size to the new visual. + // in this case, the Property Map must be initialized so that the previous value is not reused. + // after mVisual is updated, the correct value will be reset. Toolkit::Visual::Base visual = DevelControl::GetVisual( *this, Toolkit::ImageView::Property::IMAGE ); if( visual && visual != mVisual ) { - visual.SetTransformAndSize( transformMap, size ); + visual.SetTransformAndSize( Property::Map(), size ); } } } @@ -433,7 +442,7 @@ void ImageView::SetProperty( BaseObject* object, Property::Index index, const Pr case Toolkit::ImageView::Property::IMAGE: { std::string imageUrl; - Property::Map* map; + const Property::Map* map; if( value.Get( imageUrl ) ) { impl.SetImage( imageUrl, ImageDimensions() );