menufw/menufwui/mmwidgets/src/mmgridview.cpp
branchRCL_3
changeset 12 9674c1a575e9
parent 5 c743ef5928ba
child 19 79311d856354
--- a/menufw/menufwui/mmwidgets/src/mmgridview.cpp	Fri Mar 12 15:41:49 2010 +0200
+++ b/menufw/menufwui/mmwidgets/src/mmgridview.cpp	Mon Mar 15 12:39:47 2010 +0200
@@ -95,7 +95,7 @@
         TInt mirroredItemCol = colNum - itemCol - 1;
         aItemIndex = aItemIndex - itemCol + mirroredItemCol;
         }
-    
+
     // return CAknGridView::ItemPos( aItemIndex );
     return CorrectItemPos( aItemIndex );
     }
@@ -109,19 +109,19 @@
     // it the assertion below fails, review this implementation to make sure that
     // primary vertical case is handled correctly
     ASSERT( !IsPrimaryVertical() );
-    
+
     ASSERT( aItemIndex >= 0 );
     const TInt colNum = NumberOfColsInView();
     TInt itemRow = aItemIndex / colNum;
     TInt itemCol = aItemIndex % colNum;
-    
+
     TInt topItemRow = TopItemIndex() / colNum;
 //    __ASSERT_DEBUG( TopItemIndex() % colNum == 0, User::Invariant() );
-    
+
     // it is safe to assume that size between items is (0, 0) because we
     // explicitly set such value in CMmGrid::DoSetupLayoutL
     const TSize sizeBetweenItems( 0, 0 );
-    
+
     TPoint itemPos(
         iViewRect.iTl.iX + itemCol *
             ( ColumnWidth() + sizeBetweenItems.iWidth ),
@@ -240,7 +240,18 @@
 		iWin->Invalidate( *aClipRect );
 		iWin->BeginRedraw( *aClipRect );
     	}
-    CAknGridView::Draw( aClipRect );
+
+    if ( !itemDrawer->IsEditMode() )
+        {
+        itemDrawer->DrawBackgroundAndSeparatorLines(ViewRect());
+        itemDrawer->SetRedrawItemBackground( EFalse );
+        CAknGridView::Draw( aClipRect );
+        itemDrawer->SetRedrawItemBackground( ETrue );
+        }
+    else
+        {
+        CAknGridView::Draw( aClipRect );
+        }
 
 	if ( aClipRect )
 	    {
@@ -288,7 +299,7 @@
 	CMmListBoxItemDrawer* itemDrawer =
 	        STATIC_CAST( CMmListBoxItemDrawer*, ItemDrawer() );
 	static_cast<CMmGrid*>(itemDrawer->Widget())->SetItemHeight( aItemHeight );
-	
+
 	CAknGridView::SetItemHeight(aItemHeight);
 	}