uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp
branchRCL_3
changeset 10 9f56a4e1b8ab
parent 9 aabf2c525e0f
child 55 aecbbf00d063
equal deleted inserted replaced
9:aabf2c525e0f 10:9f56a4e1b8ab
   793         }
   793         }
   794     else if ( aType == KEikMessageFadeAllWindows )
   794     else if ( aType == KEikMessageFadeAllWindows )
   795         {
   795         {
   796         if ( Observer() ) 
   796         if ( Observer() ) 
   797             {
   797             {
       
   798             if ( iExtension ) 
       
   799                 {
       
   800                 iExtension->iInformObserver = EFalse;
       
   801                 } 
   798             // this will close the stylus popup menu
   802             // this will close the stylus popup menu
   799             TRAP_IGNORE( Observer()->HandleControlEventL( this,
   803             TRAP_IGNORE( Observer()->HandleControlEventL( this,
   800                 MCoeControlObserver::EEventRequestExit ) );
   804                 MCoeControlObserver::EEventRequestExit ) );
   801             }    
   805             }    
   802         }            
   806         }            
   803     else if ( aType == KEikDynamicLayoutVariantSwitch ) 
   807     else if ( aType == KEikDynamicLayoutVariantSwitch ) 
   804         {
   808         {
   805         if ( Observer() ) 
   809         if ( Observer() ) 
   806             {
   810             {
       
   811             if ( iExtension ) 
       
   812                 {
       
   813                 iExtension->iInformObserver = EFalse;
       
   814                 } 
   807             // this will close the stylus popup menu
   815             // this will close the stylus popup menu
   808             TRAP_IGNORE( Observer()->HandleControlEventL( this,
   816             TRAP_IGNORE( Observer()->HandleControlEventL( this,
   809                 MCoeControlObserver::EEventRequestCancel ) );
   817                 MCoeControlObserver::EEventRequestCancel ) );
   810             }    
   818             }    
   811         }            
   819         }            
  1018     
  1026     
  1019         layoutText.DrawText( aGc, *(iItems[aItem]->iText), ETrue, textColor ); 
  1027         layoutText.DrawText( aGc, *(iItems[aItem]->iText), ETrue, textColor ); 
  1020 
  1028 
  1021         if ( aItem < iLastVisibleItem )
  1029         if ( aItem < iLastVisibleItem )
  1022             {
  1030             {
  1023             AknListUtils::DrawSeparator( aGc, rect, textColor );
  1031             AknListUtils::DrawSeparator( aGc, rect, textColor, skin );
  1024             }
  1032             }
  1025 		}
  1033 		}
  1026     }
  1034     }
  1027 
  1035 
  1028 // -----------------------------------------------------------------------------
  1036 // -----------------------------------------------------------------------------
  1285             itemRect.SetRect( TPoint( 0,0 ), TPoint( 0,0 ) );
  1293             itemRect.SetRect( TPoint( 0,0 ), TPoint( 0,0 ) );
  1286             }
  1294             }
  1287         iItems[i]->iRect = itemRect;
  1295         iItems[i]->iRect = itemRect;
  1288         }
  1296         }
  1289 
  1297 
  1290     if ( lastItem == iItems.Count() )
  1298     if ( lastItem == iItems.Count() || ( Rect().Height() % singleItemHeight ) == 0 )
  1291         {
  1299         {
  1292         // substract the partially visible item
  1300         // substract the partially visible item
  1293         --lastItem;
  1301         --lastItem;
  1294         }
  1302         }
  1295     
  1303     
  1402 //
  1410 //
  1403 void CAknStylusPopUpMenuContent::HandleLosingForeground()
  1411 void CAknStylusPopUpMenuContent::HandleLosingForeground()
  1404     {
  1412     {
  1405     if ( Observer() )
  1413     if ( Observer() )
  1406         {
  1414         {
       
  1415         if ( iExtension ) 
       
  1416             {
       
  1417             iExtension->iInformObserver = EFalse;
       
  1418             } 
  1407         // this will close the stylus popup menu
  1419         // this will close the stylus popup menu
  1408         TRAP_IGNORE( Observer()->HandleControlEventL( this,
  1420         TRAP_IGNORE( Observer()->HandleControlEventL( this,
  1409             MCoeControlObserver::EEventRequestExit ) );
  1421             MCoeControlObserver::EEventRequestExit ) );
  1410         }
  1422         }
  1411     }
  1423     }