Fix for TDIS-6016 & 6017
authorSaravana Balaji <saravana.bs@samsung.com>
Wed, 5 Jun 2013 11:21:44 +0000 (16:51 +0530)
committerSaravana Balaji <saravana.bs@samsung.com>
Wed, 5 Jun 2013 11:21:44 +0000 (16:51 +0530)
Change-Id: I816927326036a979d4d31270e999d424c6290149
Signed-off-by: Saravana Balaji <saravana.bs@samsung.com>
src/ui/controls/FUiCtrl_IconListItem.cpp
src/ui/controls/FUiCtrl_IconListPresenter.cpp

index 0c32872..dfe1895 100644 (file)
@@ -582,7 +582,7 @@ _IconListItem::DrawCheck(Canvas& canvas, float ratio)
        float checkMargin = __pProperty->GetCheckMargin();
 
        FloatRectangle bitmapBounds = __pProperty->GetItemBitmapBounds();
-       FloatPoint checkPosition(bitmapBounds.x, bitmapBounds.y);
+       FloatPoint checkPosition(0.0f, 0.0f);
        switch (__pProperty->GetCheckBoxPosition())
        {
        case ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT:
index 98de74a..a7e562f 100644 (file)
@@ -1861,7 +1861,11 @@ _IconListPresenter::DrawVerticalScrollList(void)
        __firstDrawnIndex = index;
        __firstDrawnItemFullyDrawn = _FloatCompareGE(itemRect.y, 0);
 
-       while (itemRect.y < endYPos)
+       float lastDrawnItemY = 0.0f;
+       int lastIndex = -1;
+       bool isUpdated = false;
+
+       while (itemRect.y < endYPos || index <= __lastDrawnIndex)
        {
                itemRect.x = __startPosOfAxis;
                while (itemRect.x < endXPos && index < itemCount)
@@ -1892,9 +1896,15 @@ _IconListPresenter::DrawVerticalScrollList(void)
                        itemRect.x += unitWidth;
                }
                itemRect.y += unitHeight;
+               if (itemRect.y >= endYPos && !isUpdated)
+               {
+                       isUpdated = true;
+                       lastIndex = index;
+                       lastDrawnItemY = itemRect.y;
+               }
        }
-       __lastDrawnIndex = index - 1;
-       __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, itemRect.y);
+       __lastDrawnIndex = lastIndex - 1;
+       __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, lastDrawnItemY);
 
        // Support Accessibility
        __RequestToDrawAccessibilityFocusUi = true;