uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp
branchRCL_3
changeset 72 a5e7a4f63858
parent 64 85902f042028
--- a/uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp	Wed Sep 15 12:29:17 2010 +0300
+++ b/uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp	Wed Oct 13 14:50:15 2010 +0300
@@ -1030,7 +1030,7 @@
             {
             AknListUtils::DrawSeparator( aGc, rect, textColor, skin );
             }
-        }
+		}
     }
 
 // -----------------------------------------------------------------------------
@@ -1214,11 +1214,11 @@
                     {
                     iSBFrame->DrawBackground( EFalse, EFalse );
                     if ( AknLayoutUtils::LayoutMirrored() )
-                        {
+        	            {
                         listRect.iTl.iX += AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
-                        }
+        	            }
                     else
-                        {
+        	            {
                         listRect.iBr.iX -= AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
                         }
                     }
@@ -1227,14 +1227,14 @@
         else
         	{
             if ( AknLayoutUtils::LayoutMirrored() )
-                {
+	            {
                 listRect.iTl.iX += AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
-                }
+	            }
             else
-                {
+	            {
                 listRect.iBr.iX -= AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
-                }
-            }
+                }        	
+        	}
 
         }
     
@@ -1295,18 +1295,12 @@
         iItems[i]->iRect = itemRect;
         }
 
-    // info:
-    //    1, according to the function MinimumSize the following 
-    // condition is always true: Rect().Height() % singleItemHeight == 0
-    //    2, the Offset is in the range of [0 , singleItemHeight)
-    //    we get partial items only when Offset is not zero during scrolling
-    // note:
-    //    should subtract the lastItem when Offset is zero without partical items
-    if ( lastItem == iItems.Count() || ( 0 == Offset() ) )
+    if ( lastItem == iItems.Count() || ( Rect().Height() % singleItemHeight ) == 0 )
         {
+        // substract the partially visible item
         --lastItem;
         }
-
+    
     return lastItem; 
     }