idlehomescreen/widgetmanager/src/wmlistbox.cpp
branchRCL_3
changeset 34 d05a55b217df
parent 16 9674c1a575e9
child 38 79311d856354
--- a/idlehomescreen/widgetmanager/src/wmlistbox.cpp	Wed Mar 31 21:17:19 2010 +0300
+++ b/idlehomescreen/widgetmanager/src/wmlistbox.cpp	Wed Apr 14 15:47:59 2010 +0300
@@ -166,6 +166,26 @@
         iDefaultLogoImageMask, size, EAspectRatioPreserved );
     }
 	
+
+// ---------------------------------------------------------
+// CWmListItemDrawer::UpdateItemHeight
+// ---------------------------------------------------------
+//
+void CWmListItemDrawer::UpdateItemHeight()
+    {
+    // sets item height according to layout
+    TAknWindowLineLayout listPane = AknLayoutScalable_Apps
+        ::list_wgtman_pane().LayoutLine();
+    TAknLayoutRect listPaneRect;
+    listPaneRect.LayoutRect( iListBox->Rect(), listPane );
+    TAknWindowLineLayout listRowPane = AknLayoutScalable_Apps
+        ::listrow_wgtman_pane().LayoutLine();
+    TAknLayoutRect listRowPaneRect;
+    listRowPaneRect.LayoutRect( listPaneRect.Rect(), listRowPane );
+    iListBox->View()->SetItemHeight( listRowPaneRect.Rect().Height() );
+    iListBox->View()->ItemDrawer()->SetItemCellSize( listRowPaneRect.Rect().Size() );
+    }
+
 // ---------------------------------------------------------
 // CWmListItemDrawer::DrawItem
 // ---------------------------------------------------------
@@ -571,7 +591,8 @@
                     static_cast <CWmListItemDrawer*>( iItemDrawer );
     if ( itemDrawer )
         {
-        return itemDrawer->ResizeDefaultBitmaps();
+        itemDrawer->UpdateItemHeight();
+        itemDrawer->ResizeDefaultBitmaps();
         }
     }