From: Ferran Sole Date: Fri, 17 Jun 2016 11:19:28 +0000 (+0100) Subject: Corrected popup position in text decorator when grab handle is active X-Git-Tag: dali_1.1.40~7^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=26591c0c1628739c9f06d78e5aaeb552f74ff74b Corrected popup position in text decorator when grab handle is active Change-Id: I05457a35b56a5c01a589f71a2df853d3c848b51f --- diff --git a/dali-toolkit/internal/text/decorator/text-decorator.cpp b/dali-toolkit/internal/text/decorator/text-decorator.cpp index cf47cb3..ff03ac9 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.cpp +++ b/dali-toolkit/internal/text/decorator/text-decorator.cpp @@ -486,7 +486,6 @@ struct Decorator::Impl : public ConnectionTracker { const HandleImpl& primaryHandle = mHandle[LEFT_SELECTION_HANDLE]; const HandleImpl& secondaryHandle = mHandle[RIGHT_SELECTION_HANDLE]; - const HandleImpl& grabHandle = mHandle[GRAB_HANDLE]; const CursorImpl& cursor = mCursor[PRIMARY_CURSOR]; if( primaryHandle.active || secondaryHandle.active ) @@ -502,7 +501,15 @@ struct Decorator::Impl : public ConnectionTracker else { // Calculates the popup's position if the grab handle is active. - mCopyPastePopup.position = Vector3( cursor.position.x, -0.5f * popupSize.height - grabHandle.size.height + cursor.position.y, 0.0f ); + const HandleImpl& grabHandle = mHandle[GRAB_HANDLE]; + if( grabHandle.verticallyFlipped ) + { + mCopyPastePopup.position = Vector3( cursor.position.x, -0.5f * popupSize.height - grabHandle.size.height + cursor.position.y, 0.0f ); + } + else + { + mCopyPastePopup.position = Vector3( cursor.position.x, -0.5f * popupSize.height + cursor.position.y, 0.0f ); + } } }