N_SE-55569, N_SE-55314, N_SE-54902, N_SE-54843
authorKunal Sinha <kunal.sinha@samsung.com>
Tue, 22 Oct 2013 09:26:29 +0000 (14:56 +0530)
committerKunal Sinha <kunal.sinha@samsung.com>
Tue, 22 Oct 2013 09:58:36 +0000 (15:28 +0530)
Change-Id: I7dbedcf03b10664f48b50c64d8c2b79108a57ee9
Signed-off-by: Kunal Sinha <kunal.sinha@samsung.com>
src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp
src/ui/controls/FUiCtrl_EditPresenter.cpp

index 2c10e08..60264db 100644 (file)
@@ -884,8 +884,8 @@ _EditCopyPasteHandler::AdjustBounds(void)
                rect.x = cursorRect.x - __pHandlerBitmap->GetWidthF()/2.0f;
                rect.y = cursorRect.y + cursorRect.height;
 
-               FloatRectangle alignedCursorRect = CoordinateSystem::AlignToDevice(cursorRect);
-               checkPoint = FloatPoint(cursorRect.x, alignedCursorRect.y + alignedCursorRect.height);
+               checkPoint = FloatPoint(cursorRect.x, cursorRect.y + cursorRect.height);
+
                if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)
                {
                        rect.y -= (cursorRect.height + __pHandlerBitmap->GetHeightF());
@@ -905,8 +905,7 @@ _EditCopyPasteHandler::AdjustBounds(void)
                rect.x = cursorRect.x;
                rect.y = cursorRect.y + cursorRect.height;
 
-               FloatRectangle alignedCursorRect = CoordinateSystem::AlignToDevice(cursorRect);
-               checkPoint = FloatPoint(cursorRect.x, alignedCursorRect.y + alignedCursorRect.height);
+               checkPoint = FloatPoint(cursorRect.x, cursorRect.y + cursorRect.height);
 
                if (__leftHandler)
                {
index 206f2bd..4b71795 100755 (executable)
@@ -7248,6 +7248,7 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCurs
        float cursorHeight = 0.0f;
        float cursorRelativeX = 0.0f;
        float cursorRelativeY = 0.0f;
+       float cursorHeightDiff = 0.0f;
 
        FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
 
@@ -7284,11 +7285,18 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCurs
 
        absCursorBounds.width = cursorWidth;
 
+       cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height;
+
        if (cursorHeight > 0.0f)
        {
-               if (cursorHeight <= __calculatedCursorBounds.height || !clipCursorHeight)
+               if (cursorHeight <= __calculatedCursorBounds.height || (!clipCursorHeight))
                {
-                       absCursorBounds.height = cursorHeight;
+                               absCursorBounds.height = cursorHeight;
+
+                               if (!clipCursorHeight && __pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE && (cursorHeightDiff <= 2.0f))
+                               {
+                                       absCursorBounds.height = __calculatedCursorBounds.height;
+                               }
                }
                else
                {
@@ -7319,6 +7327,7 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, Flo
        float cursorHeight = 0.0f;
        float cursorRelativeX = 0.0f;
        float cursorRelativeY = 0.0f;
+       float cursorHeightDiff = 0.0f;
 
        FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true);
 
@@ -7346,21 +7355,28 @@ _EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, Flo
 
        absCursorBounds.width = cursorWidth;
 
+       cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height;
+
        if (cursorHeight > 0.0f)
        {
                if (cursorHeight <= __calculatedCursorBounds.height || !clipCursorHeight)
                {
                        absCursorBounds.height = cursorHeight;
+
+                       if (!clipCursorHeight && __pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE && (cursorHeightDiff <= 2.0f))
+                       {
+                               absCursorBounds.height = __calculatedCursorBounds.height;
+                       }
                }
                else
                {
                        if (__calculatedCursorBounds.height > 0)
                        {
-                                  absCursorBounds.height = __calculatedCursorBounds.height;
+                               absCursorBounds.height = __calculatedCursorBounds.height;
                        }
                        else
                        {
-                                  absCursorBounds.height = cursorHeight;
+                               absCursorBounds.height = cursorHeight;
                        }
                }
        }