uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp
branchRCL_3
changeset 72 a5e7a4f63858
parent 64 85902f042028
equal deleted inserted replaced
64:85902f042028 72:a5e7a4f63858
  1028 
  1028 
  1029         if ( aItem < iLastVisibleItem )
  1029         if ( aItem < iLastVisibleItem )
  1030             {
  1030             {
  1031             AknListUtils::DrawSeparator( aGc, rect, textColor, skin );
  1031             AknListUtils::DrawSeparator( aGc, rect, textColor, skin );
  1032             }
  1032             }
  1033         }
  1033 		}
  1034     }
  1034     }
  1035 
  1035 
  1036 // -----------------------------------------------------------------------------
  1036 // -----------------------------------------------------------------------------
  1037 // CAknStylusPopUpMenuContent::StartAnimation
  1037 // CAknStylusPopUpMenuContent::StartAnimation
  1038 // -----------------------------------------------------------------------------
  1038 // -----------------------------------------------------------------------------
  1212 
  1212 
  1213                 if ( !err )
  1213                 if ( !err )
  1214                     {
  1214                     {
  1215                     iSBFrame->DrawBackground( EFalse, EFalse );
  1215                     iSBFrame->DrawBackground( EFalse, EFalse );
  1216                     if ( AknLayoutUtils::LayoutMirrored() )
  1216                     if ( AknLayoutUtils::LayoutMirrored() )
  1217                         {
  1217         	            {
  1218                         listRect.iTl.iX += AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1218                         listRect.iTl.iX += AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1219                         }
  1219         	            }
  1220                     else
  1220                     else
  1221                         {
  1221         	            {
  1222                         listRect.iBr.iX -= AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1222                         listRect.iBr.iX -= AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1223                         }
  1223                         }
  1224                     }
  1224                     }
  1225                 }
  1225                 }
  1226             }
  1226             }
  1227         else
  1227         else
  1228         	{
  1228         	{
  1229             if ( AknLayoutUtils::LayoutMirrored() )
  1229             if ( AknLayoutUtils::LayoutMirrored() )
  1230                 {
  1230 	            {
  1231                 listRect.iTl.iX += AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1231                 listRect.iTl.iX += AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1232                 }
  1232 	            }
  1233             else
  1233             else
  1234                 {
  1234 	            {
  1235                 listRect.iBr.iX -= AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1235                 listRect.iBr.iX -= AknLayoutScalable_Avkon::scroll_pane().LayoutLine().iW;
  1236                 }
  1236                 }        	
  1237             }
  1237         	}
  1238 
  1238 
  1239         }
  1239         }
  1240     
  1240     
  1241     // Adjust first and last item 
  1241     // Adjust first and last item 
  1242     if ( iFirstItem < firstItem )
  1242     if ( iFirstItem < firstItem )
  1293             itemRect.SetRect( TPoint( 0,0 ), TPoint( 0,0 ) );
  1293             itemRect.SetRect( TPoint( 0,0 ), TPoint( 0,0 ) );
  1294             }
  1294             }
  1295         iItems[i]->iRect = itemRect;
  1295         iItems[i]->iRect = itemRect;
  1296         }
  1296         }
  1297 
  1297 
  1298     // info:
  1298     if ( lastItem == iItems.Count() || ( Rect().Height() % singleItemHeight ) == 0 )
  1299     //    1, according to the function MinimumSize the following 
  1299         {
  1300     // condition is always true: Rect().Height() % singleItemHeight == 0
  1300         // substract the partially visible item
  1301     //    2, the Offset is in the range of [0 , singleItemHeight)
       
  1302     //    we get partial items only when Offset is not zero during scrolling
       
  1303     // note:
       
  1304     //    should subtract the lastItem when Offset is zero without partical items
       
  1305     if ( lastItem == iItems.Count() || ( 0 == Offset() ) )
       
  1306         {
       
  1307         --lastItem;
  1301         --lastItem;
  1308         }
  1302         }
  1309 
  1303     
  1310     return lastItem; 
  1304     return lastItem; 
  1311     }
  1305     }
  1312 
  1306 
  1313 // ---------------------------------------------------------------------------
  1307 // ---------------------------------------------------------------------------
  1314 // From class CCoeControl
  1308 // From class CCoeControl