uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp
branchRCL_3
changeset 64 85902f042028
parent 59 978afdc0236f
child 72 a5e7a4f63858
equal deleted inserted replaced
59:978afdc0236f 64:85902f042028
  1024         AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnTextColors,
  1024         AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnTextColors,
  1025                                        EAknsCIQsnTextColorsCG20 );
  1025                                        EAknsCIQsnTextColorsCG20 );
  1026     
  1026     
  1027         layoutText.DrawText( aGc, *(iItems[aItem]->iText), ETrue, textColor ); 
  1027         layoutText.DrawText( aGc, *(iItems[aItem]->iText), ETrue, textColor ); 
  1028 
  1028 
  1029         if ( aItem < iItems.Count()-1 )
  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     }
  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     if ( lastItem == iItems.Count() || ( Rect().Height() % singleItemHeight ) == 0 )
  1298     // info:
  1299         {
  1299     //    1, according to the function MinimumSize the following 
  1300         // substract the partially visible item
  1300     // condition is always true: Rect().Height() % singleItemHeight == 0
       
  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         {
  1301         --lastItem;
  1307         --lastItem;
  1302         }
  1308         }
  1303     
  1309 
  1304     return lastItem; 
  1310     return lastItem; 
  1305     }
  1311     }
  1306 
  1312 
  1307 // ---------------------------------------------------------------------------
  1313 // ---------------------------------------------------------------------------
  1308 // From class CCoeControl
  1314 // From class CCoeControl