X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-input%2Ftext-input-handles-impl.cpp;h=aa5ca7dfc27a1b008c7821cb0f5e3512aa1e31a8;hp=c4d831bb33f1e5c97e82d0cca20184ba86ee0c5f;hb=353751aa9ad608f8b9ab5f8c9daa679516e53554;hpb=57869973578f6a0b0f836d396c7232ddb8302c6b diff --git a/dali-toolkit/internal/controls/text-input/text-input-handles-impl.cpp b/dali-toolkit/internal/controls/text-input/text-input-handles-impl.cpp index c4d831b..aa5ca7d 100644 --- a/dali-toolkit/internal/controls/text-input/text-input-handles-impl.cpp +++ b/dali-toolkit/internal/controls/text-input/text-input-handles-impl.cpp @@ -24,6 +24,7 @@ #include #include #include +#include // INTERNAL INCLUDES #include @@ -61,7 +62,8 @@ Actor CreateGrabArea( const std::string& name, const Vector3& relativeScale ) Actor handleGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move handleGrabArea.SetName( name ); - handleGrabArea.ApplyConstraint( Constraint::New( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( relativeScale ) ) ); // grab area to be larger than text actor + handleGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT ); + handleGrabArea.SetSizeModeFactor( relativeScale ); handleGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION ); return handleGrabArea; @@ -112,8 +114,8 @@ void TextInputHandles::CreateSelectionHandles() { DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextInputHandles: CreateSelectionHandles\n" ); - mSelectionHandleOneImage = Image::New( DEFAULT_SELECTION_HANDLE_ONE ); - mSelectionHandleOneImagePressed = Image::New( DEFAULT_SELECTION_HANDLE_ONE_PRESSED ); + mSelectionHandleOneImage = ResourceImage::New( DEFAULT_SELECTION_HANDLE_ONE ); + mSelectionHandleOneImagePressed = ResourceImage::New( DEFAULT_SELECTION_HANDLE_ONE_PRESSED ); mSelectionHandleOne = CreateHandle( AnchorPoint::TOP_RIGHT, mSelectionHandleOneImage, "SelectionHandleOne" ); mIsSelectionHandleOneFlipped = false; @@ -123,8 +125,8 @@ void TextInputHandles::CreateSelectionHandles() // mTapDetector.Attach( mHandleOneGrabArea ); - mSelectionHandleTwoImage = Image::New( DEFAULT_SELECTION_HANDLE_TWO ); - mSelectionHandleTwoImagePressed = Image::New( DEFAULT_SELECTION_HANDLE_TWO_PRESSED ); + mSelectionHandleTwoImage = ResourceImage::New( DEFAULT_SELECTION_HANDLE_TWO ); + mSelectionHandleTwoImagePressed = ResourceImage::New( DEFAULT_SELECTION_HANDLE_TWO_PRESSED ); mSelectionHandleTwo = CreateHandle( AnchorPoint::TOP_LEFT, mSelectionHandleTwoImage, "SelectionHandleTwo" ); mIsSelectionHandleTwoFlipped = false; @@ -245,7 +247,7 @@ void TextInputHandles::CreateGrabHandle() { if ( !mGrabHandleImage ) { - mGrabHandleImage = Image::New( DEFAULT_GRAB_HANDLE ); + mGrabHandleImage = ResourceImage::New( DEFAULT_GRAB_HANDLE ); } mGrabHandle = CreateHandle( AnchorPoint::TOP_CENTER, mGrabHandleImage, "GrabHandle" );