X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fslider%2Fslider-impl.cpp;h=275995d38b05b52f0728c760e3f18201994aabec;hb=a507d54721445b44cfea7fb032a68d996bf17f09;hp=03883d2f0dbb51f3ce7b360562809faa0f0a663f;hpb=190217c8f02a9a1703dedfe38eb1974b6830e5ac;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/slider/slider-impl.cpp b/dali-toolkit/internal/controls/slider/slider-impl.cpp index 03883d2..275995d 100755 --- a/dali-toolkit/internal/controls/slider/slider-impl.cpp +++ b/dali-toolkit/internal/controls/slider/slider-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -25,7 +25,7 @@ #include #include #include -#include +#include // INTERNAL INCLUDES #include @@ -134,7 +134,7 @@ Dali::Toolkit::Slider Slider::New() } Slider::Slider() -: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ), +: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ), mState( NORMAL ), mPopupVisual(""), mPopupArrowVisual(""), @@ -205,10 +205,6 @@ void Slider::OnInitialize() self.TouchSignal().Connect( this, &Slider::OnTouch ); } -void Slider::OnSizeSet( const Vector3& size ) -{ -} - void Slider::OnRelayout( const Vector2& size, RelayoutContainer& container ) { SetHitRegion( Vector2( size.x, GetHitRegion().y ) ); @@ -524,8 +520,9 @@ void Slider::CreatePopupImage( const std::string& filename ) { if( mPopup && ( filename.size() > 0 ) ) { - Image image = ResourceImage::New( filename ); - mPopup.SetImage( image ); + Property::Map map; + map[Toolkit::ImageVisual::Property::URL] = filename; + mPopup.SetProperty( Toolkit::ImageView::Property::IMAGE, map ); } } @@ -561,8 +558,9 @@ void Slider::CreatePopupArrowImage( const std::string& filename ) { if( mPopupArrow && ( filename.size() > 0 ) ) { - Image image = ResourceImage::New( filename ); - mPopupArrow.SetImage( image ); + Property::Map map; + map[Toolkit::ImageVisual::Property::URL] = filename; + mPopupArrow.SetProperty( Toolkit::ImageView::Property::IMAGE, map ); } } @@ -1380,8 +1378,15 @@ Property::Value Slider::GetProperty( BaseObject* object, Property::Index propert case Toolkit::Slider::Property::MARKS: { - // TODO: Need to be able to return a PropertyArray - // value = sliderImpl.GetMarks(); + Property::Value value1( Property::ARRAY ); + Property::Array* markArray = value1.GetArray(); + + if( markArray ) + { + *markArray = sliderImpl.GetMarks(); + } + + value = value1; break; }