idlehomescreen/widgetmanager/src/wmlistbox.cpp
branchRCL_3
changeset 34 d05a55b217df
parent 16 9674c1a575e9
child 38 79311d856354
equal deleted inserted replaced
30:b8fae6b8a148 34:d05a55b217df
   164         iDefaultLogoImage, size, EAspectRatioPreserved );
   164         iDefaultLogoImage, size, EAspectRatioPreserved );
   165     AknIconUtils::SetSize( 
   165     AknIconUtils::SetSize( 
   166         iDefaultLogoImageMask, size, EAspectRatioPreserved );
   166         iDefaultLogoImageMask, size, EAspectRatioPreserved );
   167     }
   167     }
   168 	
   168 	
       
   169 
       
   170 // ---------------------------------------------------------
       
   171 // CWmListItemDrawer::UpdateItemHeight
       
   172 // ---------------------------------------------------------
       
   173 //
       
   174 void CWmListItemDrawer::UpdateItemHeight()
       
   175     {
       
   176     // sets item height according to layout
       
   177     TAknWindowLineLayout listPane = AknLayoutScalable_Apps
       
   178         ::list_wgtman_pane().LayoutLine();
       
   179     TAknLayoutRect listPaneRect;
       
   180     listPaneRect.LayoutRect( iListBox->Rect(), listPane );
       
   181     TAknWindowLineLayout listRowPane = AknLayoutScalable_Apps
       
   182         ::listrow_wgtman_pane().LayoutLine();
       
   183     TAknLayoutRect listRowPaneRect;
       
   184     listRowPaneRect.LayoutRect( listPaneRect.Rect(), listRowPane );
       
   185     iListBox->View()->SetItemHeight( listRowPaneRect.Rect().Height() );
       
   186     iListBox->View()->ItemDrawer()->SetItemCellSize( listRowPaneRect.Rect().Size() );
       
   187     }
       
   188 
   169 // ---------------------------------------------------------
   189 // ---------------------------------------------------------
   170 // CWmListItemDrawer::DrawItem
   190 // CWmListItemDrawer::DrawItem
   171 // ---------------------------------------------------------
   191 // ---------------------------------------------------------
   172 //
   192 //
   173 void CWmListItemDrawer::DrawItem( TInt aItemIndex, TPoint aItemRectPos, 
   193 void CWmListItemDrawer::DrawItem( TInt aItemIndex, TPoint aItemRectPos, 
   569     
   589     
   570     CWmListItemDrawer* itemDrawer = 
   590     CWmListItemDrawer* itemDrawer = 
   571                     static_cast <CWmListItemDrawer*>( iItemDrawer );
   591                     static_cast <CWmListItemDrawer*>( iItemDrawer );
   572     if ( itemDrawer )
   592     if ( itemDrawer )
   573         {
   593         {
   574         return itemDrawer->ResizeDefaultBitmaps();
   594         itemDrawer->UpdateItemHeight();
       
   595         itemDrawer->ResizeDefaultBitmaps();
   575         }
   596         }
   576     }
   597     }
   577 
   598 
   578 // ---------------------------------------------------------
   599 // ---------------------------------------------------------
   579 // CWmListBox::Draw
   600 // CWmListBox::Draw