uifw/AvKon/src/eikfrlb.cpp
branchRCL_3
changeset 55 aecbbf00d063
parent 29 a8834a2e9a96
child 56 d48ab3b357f1
equal deleted inserted replaced
51:fcdfafb36fe7 55:aecbbf00d063
     1 /*
     1 /*
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   160 
   160 
   161         if ( backgroundDrawer )
   161         if ( backgroundDrawer )
   162             {
   162             {
   163             backgroundDrawer->Draw( *iGc, *control, r );
   163             backgroundDrawer->Draw( *iGc, *control, r );
   164             }
   164             }
   165         else
   165         else if ( CAknEnv::Static()->TransparencyEnabled() )
   166             {
   166             {
   167             AknsDrawUtils::Background( AknsUtils::SkinInstance(), cc, control, *iGc, r,
   167             AknsDrawUtils::Background( AknsUtils::SkinInstance(), cc, control, *iGc, r,
   168                                    KAknsDrawParamNoClearUnderImage );
   168                                    KAknsDrawParamNoClearUnderImage );
       
   169             }
       
   170         else
       
   171             {
       
   172             AknsDrawUtils::Background( AknsUtils::SkinInstance(), cc, control, *iGc, r,
       
   173                                    KAknsDrawParamNoClearUnderImage |
       
   174                                    KAknsDrawParamBottomLevelRGBOnly );
   169             }
   175             }
   170         }
   176         }
   171     else
   177     else
   172         {
   178         {
   173         iGc->Clear( r );
   179         iGc->Clear( r );
   211         transApi->StopDrawing();
   217         transApi->StopDrawing();
   212         }
   218         }
   213 #endif //RD_UI_TRANSITION_EFFECTS_LIST
   219 #endif //RD_UI_TRANSITION_EFFECTS_LIST
   214 
   220 
   215     TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse());
   221     TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse());
   216     
       
   217     if ( Flags() & CListItemDrawer::EMarkingModeEnabled )
       
   218         {
       
   219         removeicon = EFalse;
       
   220         }
       
   221 
   222 
   222     CFormattedCellListBoxData::TColors colors;
   223     CFormattedCellListBoxData::TColors colors;
   223     colors.iText=iTextColor;
   224     colors.iText=iTextColor;
   224     colors.iBack=iBackColor;
   225     colors.iBack=iBackColor;
   225     colors.iHighlightedText=iHighlightedTextColor;
   226     colors.iHighlightedText=iHighlightedTextColor;
   226     colors.iHighlightedBack=iHighlightedBackColor;
   227     colors.iHighlightedBack=iHighlightedBackColor;
   227 
   228 
   228     DrawBackgroundAndSeparatorLines( aItemTextRect, 
   229     DrawBackgroundAndSeparatorLines( aItemTextRect );
   229             aItemIndex != FormattedCellData()->ListBox()->BottomItemIndex() );
       
   230    
   230    
   231     TBool highlightShown = ETrue;
   231     TBool highlightShown = ETrue;
   232     
   232     
   233     if (FormattedCellData()->RespectFocus() && !aViewIsEmphasized)
   233     if (FormattedCellData()->RespectFocus() && !aViewIsEmphasized)
   234         {
   234         {
   401 EXPORT_C void CFormattedCellListBoxItemDrawer::SetTopItemIndex(TInt aTop)
   401 EXPORT_C void CFormattedCellListBoxItemDrawer::SetTopItemIndex(TInt aTop)
   402     {
   402     {
   403     iTopItemIndex = aTop;
   403     iTopItemIndex = aTop;
   404     }
   404     }
   405 
   405 
       
   406 void 
       
   407 CFormattedCellListBoxItemDrawer::DrawCurrentItemRect(const TRect& aRect) const
       
   408     {
       
   409     _AKNTRACE_FUNC_ENTER;    
       
   410     iGc->SetClippingRect(iViewRect);
       
   411     iGc->SetBrushStyle(CGraphicsContext::ENullBrush);
       
   412     iGc->SetPenColor(iHighlightedBackColor);
       
   413     iGc->DrawRect(aRect);
       
   414     iGc->CancelClippingRect();
       
   415     _AKNTRACE_FUNC_EXIT;
       
   416     }
       
   417 
   406 
   418 
   407 //
   419 //
   408 // CEikFormattedCellListBox
   420 // CEikFormattedCellListBox
   409 //
   421 //
   410 
   422 
   497     }
   509     }
   498 
   510 
   499 #ifdef RD_LIST_STRETCH
   511 #ifdef RD_LIST_STRETCH
   500 EXPORT_C void CEikFormattedCellListBox::EnableStretching( const TBool aEnabled )
   512 EXPORT_C void CEikFormattedCellListBox::EnableStretching( const TBool aEnabled )
   501     {
   513     {
   502     if ( ItemDrawer() && 
   514     if ( ItemDrawer()->FormattedCellData()->StretchingEnabled() != aEnabled )
   503          ( ItemDrawer()->FormattedCellData()->StretchingEnabled() != aEnabled ) )
       
   504         {
   515         {
   505         ItemDrawer()->FormattedCellData()->EnableStretching( aEnabled );
   516         ItemDrawer()->FormattedCellData()->EnableStretching( aEnabled );
   506         SizeChanged();
   517         SizeChanged();
   507         }
   518         }
   508     }
   519     }
   765 #define ITEM_EXISTS(x) (((x) > -1) && ((x) < no_of_items__))
   776 #define ITEM_EXISTS(x) (((x) > -1) && ((x) < no_of_items__))
   766 
   777 
   767 #define ITEM_EXISTS_ONCE(x) (((x) > -1) && ((x) < iModel->NumberOfItems()))
   778 #define ITEM_EXISTS_ONCE(x) (((x) > -1) && ((x) < iModel->NumberOfItems()))
   768 
   779 
   769 EXPORT_C void
   780 EXPORT_C void
   770 CFormattedCellListBoxView::Draw( const TRect* aClipRect ) const
   781 CFormattedCellListBoxView::Draw(const TRect* clipRect) const
   771     {
   782     {
   772     _AKNTRACE_FUNC_ENTER;
   783     _AKNTRACE_FUNC_ENTER;
   773     if ( RedrawDisabled() || !IsVisible() )
   784     if ( RedrawDisabled() || !IsVisible() )
   774         {
   785         {
   775         _AKNTRACE("CFormattedCellListBoxView::Draw return because redraw disabled or invisible");
   786         _AKNTRACE("CFormattedCellListBoxView::Draw return because redraw disabled or invisible");
   776         _AKNTRACE_FUNC_EXIT;
   787         _AKNTRACE_FUNC_EXIT;
   777         return;
   788         return;
   778         }
   789         }
   779 
   790 
   780    if( aClipRect && aClipRect->IsEmpty() )
   791    if(clipRect && clipRect->IsEmpty())
   781         {
   792         {
   782         _AKNTRACE("CFormattedCellListBoxView::Draw return because clip rect is empty");
   793         _AKNTRACE("CFormattedCellListBoxView::Draw return because clip rect is empty");
   783         _AKNTRACE_FUNC_EXIT;
   794         _AKNTRACE_FUNC_EXIT;
   784         return;
   795         return;
   785         }
   796         }
   786                 
   797                 
   787     TInt i = iTopItemIndex;
   798     TInt i = iTopItemIndex;
   788     CFormattedCellListBoxItemDrawer* itemDrawer =
   799     CFormattedCellListBoxItemDrawer *itemDrawer = static_cast<CFormattedCellListBoxItemDrawer*>( iItemDrawer );
   789         static_cast<CFormattedCellListBoxItemDrawer*>( iItemDrawer );
   800     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
   790     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
   791     CCoeControl* control = itemDrawer->FormattedCellData()->Control();
   801     CCoeControl* control = itemDrawer->FormattedCellData()->Control();
   792     MAknsControlContext* cc = AknsDrawUtils::ControlContext( control );
   802     MAknsControlContext *cc = AknsDrawUtils::ControlContext( control );
   793     CWindowGc* gc = itemDrawer->Gc();
       
   794     
   803     
   795     if ( !cc )
   804     if ( !cc )
   796         {
   805         {
   797         cc = itemDrawer->FormattedCellData()->SkinBackgroundContext();
   806         cc = itemDrawer->FormattedCellData()->SkinBackgroundContext();
   798         }
   807         }
   799     
   808     
   800     itemDrawer->SetTopItemIndex( iTopItemIndex );
   809     itemDrawer->SetTopItemIndex( iTopItemIndex );
   801 
   810 
   802     TInt numberOfItems = iModel->NumberOfItems();
   811     if ( iModel->NumberOfItems() > 0 )
   803     
       
   804     if ( numberOfItems > 0 )
       
   805         {
   812         {
   806 		TBool drawingInitiated = ETrue;
   813 		TBool drawingInitiated = ETrue;
   807 		
   814 		
   808 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   815 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   809         MAknListBoxTfxInternal* transApi =
   816         MAknListBoxTfxInternal* transApi =
   810             CAknListLoader::TfxApiInternal( gc );
   817             CAknListLoader::TfxApiInternal( iGc );
   811 #endif // RD_UI_TRANSITION_EFFECTS_LIST
   818 #endif // RD_UI_TRANSITION_EFFECTS_LIST
   812 		
   819 		
   813         if ( iWin && iWin->GetDrawRect() == TRect::EUninitialized )
   820 		if ( CAknEnv::Static()->TransparencyEnabled() )
   814     		{
   821 		    {
       
   822     		if ( iWin && iWin->GetDrawRect() == TRect::EUninitialized )
       
   823 	    		{
   815 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   824 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   816             drawingInitiated = transApi && !transApi->EffectsDisabled();
   825                 drawingInitiated = transApi && !transApi->EffectsDisabled();
   817 #else
   826 #else
   818             drawingInitiated = EFalse;
   827                 drawingInitiated = EFalse;
   819 #endif
   828 #endif
   820 			}
   829     			}
   821 
   830 
   822     	if ( !drawingInitiated )
   831 	    	if ( !drawingInitiated )
   823 	    	{
   832 		    	{
   824 			iWin->Invalidate( *aClipRect );
   833     			iWin->Invalidate( *clipRect );
   825     		iWin->BeginRedraw( *aClipRect );
   834 	    		iWin->BeginRedraw( *clipRect );
   826 	    	}
   835 		    	}
   827 
   836 		    }
   828         TInt lastPotentialItemIndex =
   837 
   829             Min( numberOfItems,
   838         TInt lastPotentialItemIndex = Min( iModel->NumberOfItems(), iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) );
   830                  iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) - 1 ) ;
   839 
   831 
   840         while ( i < lastPotentialItemIndex )      
   832         gc->SetClippingRect( iViewRect );
       
   833         
       
   834         while ( i <= lastPotentialItemIndex )      
       
   835             {
       
   836             DrawItem( i++ );
       
   837             }
       
   838 
       
   839         gc->CancelClippingRect();
       
   840 
       
   841         if ( control && !static_cast<CEikListBox*>( control )->
       
   842                 BackgroundDrawingSuppressed() )
       
   843             {
   841             {
   844 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   842 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   845             if ( transApi )
   843             if ( transApi )
   846                 {
   844                 {
   847                 transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
   845                 transApi->StartDrawing( MAknListBoxTfxInternal::EListNotSpecified );
   848                 }
   846                 }
   849 
   847 #endif // RD_UI_TRANSITION_EFFECTS_LIST
   850             if ( i > iBottomItemIndex + 1 )
   848 
   851                 {
   849             iGc->SetClippingRect( iViewRect );
   852                 i = iBottomItemIndex + 1;
   850             
   853                 }
   851 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
   854 
   852             if ( transApi )
   855             TRect usedPortionOfViewRect(
   853                 {
   856                 iViewRect.iTl + TSize( 0, iVerticalOffset ),
   854                 transApi->StopDrawing();
   857                 TSize( iViewRect.Width(), ( i - iTopItemIndex ) * iItemHeight ) );
   855                 }
       
   856 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
   857 
       
   858             DrawItem( i++ );
       
   859 
       
   860 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
   861             if ( transApi )
       
   862                 {
       
   863                 transApi->StartDrawing( MAknListBoxTfxInternal::EListNotSpecified );
       
   864                 }
       
   865 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
   866 
       
   867             iGc->CancelClippingRect();
       
   868             
       
   869 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
   870             if ( transApi )
       
   871                 {
       
   872                 transApi->StopDrawing();
       
   873                 }
       
   874 #endif // RD_UI_TRANSITION_EFFECTS_LIST
       
   875             }
       
   876 
       
   877 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       
   878         if ( transApi )
       
   879             {
       
   880             transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
       
   881             }
       
   882         if ( i > iBottomItemIndex + 1 )
       
   883             {
       
   884             i = iBottomItemIndex + 1;
       
   885             }
       
   886         TRect usedPortionOfViewRect( iViewRect.iTl+TSize(0,iVerticalOffset), TSize( iViewRect.Width(), ( i - iTopItemIndex ) * iItemHeight ) );
   858 #else
   887 #else
   859             // clear the unused portion of the viewing area
   888         // clear the unused portion of the viewing area
   860             TRect usedPortionOfViewRect( iViewRect.iTl.iX,
   889         TRect usedPortionOfViewRect( iViewRect.iTl.iX, iViewRect.iTl.iY + iVerticalOffset, iViewRect.Width(), ItemPos( lastPotentialItemIndex ).iY );
   861                                      iViewRect.iTl.iY + iVerticalOffset,
       
   862                                      iViewRect.Width(),
       
   863                                      ItemPos( lastPotentialItemIndex ).iY );
       
   864         
   890         
   865             if ( aClipRect )
   891         if ( clipRect )
   866                 {
   892             {
   867                 usedPortionOfViewRect.iBr.iX = aClipRect->iBr.iX;
   893             usedPortionOfViewRect.iBr.iX = clipRect->iBr.iX;
   868                 }
   894             }
       
   895 
   869 #endif
   896 #endif
   870 
   897 
   871             // Also draw the area behind scroll bar.
   898         // also clear area behind scroll bar.
   872             TRect sbbg( iViewRect ); // whole area behind scroll bar
   899         // this is a terrible hack, which is unfortunately needed since layouts
   873             
   900         // leave 2 pixel (in double res) wide margins to both sides of the
   874             if ( AknLayoutUtils::LayoutMirrored() )
   901         // scroll bar, and there is no other way to do this. This hack is
   875                 {
   902         // only really valid for main pane lists, but it does not seem to
   876                 _AKNTRACE("CFormattedCellListBoxView::Draw Layout mirrored");
   903         // break popup lists, popup field lists or setting page radiobutton
   877                 sbbg.iBr.iX = iViewRect.iBr.iX - itemDrawer->LafItemSize().iWidth;
   904         // lists.
   878                 }
   905         // See also: eikslb.cpp, eikclb.cpp
   879             else
   906         TRect sbbg( iViewRect );   // whole area behind scroll bar
   880                 {
   907         TRect margin( iViewRect ); // it gets even worse in mirrored layouts
   881                 sbbg.iTl.iX = iViewRect.iTl.iX + itemDrawer->LafItemSize().iWidth;
   908         
   882                 }
   909         if ( AknLayoutUtils::LayoutMirrored() )
   883     
   910             {
   884             // Unused portion will be cleared only if listbox background is drawn.
   911             _AKNTRACE("CFormattedCellListBoxView::Draw Layout mirrored");
   885             if ( itemDrawer->ColumnData()->IsBackgroundDrawingEnabled() ) 
   912             sbbg.iBr.iX = iViewRect.iBr.iX - itemDrawer->LafItemSize().iWidth;
   886                 {
   913 
   887                 if ( control )
   914             // in mirrored layouts we also need to draw a margin slice in right
       
   915             TRect mainPane;
       
   916             AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
       
   917                                                mainPane );
       
   918             TAknLayoutRect listscrollAppPane;
       
   919             listscrollAppPane.LayoutRect( mainPane,
       
   920                                           AknLayoutScalable_Avkon::listscroll_app_pane( 0 ) );
       
   921 
       
   922             TInt rMargin = mainPane.iBr.iX - listscrollAppPane.Rect().iBr.iX;
       
   923             margin.iTl.iX = margin.iBr.iX - rMargin;
       
   924             }
       
   925         else
       
   926             {
       
   927             sbbg.iTl.iX = iViewRect.iTl.iX + itemDrawer->LafItemSize().iWidth;
       
   928             }
       
   929         
       
   930         // Unused portion will be cleared only if listbox background is drawn.
       
   931         if ( itemDrawer->ColumnData()->IsBackgroundDrawingEnabled() ) 
       
   932             {
       
   933             if ( control )
       
   934                 {
       
   935                 if ( !control->FindBackground() )
   888                     {
   936                     {
   889                     if ( !control->FindBackground() )
   937                     AknsDrawUtils::BackgroundBetweenRects( skin, 
       
   938                                                        cc, 
       
   939                                                        control, 
       
   940                                                        *iGc, 
       
   941                                                        iViewRect, 
       
   942                                                        usedPortionOfViewRect );
       
   943 
       
   944                     AknsDrawUtils::Background( skin, cc, control, *iGc, sbbg );
       
   945                 
       
   946                     if ( AknLayoutUtils::LayoutMirrored() )
   890                         {
   947                         {
   891                         AknsDrawUtils::BackgroundBetweenRects( skin, 
   948                         AknsDrawUtils::Background( skin, cc, control, *iGc, margin );
   892                                                                cc, 
       
   893                                                                control, 
       
   894                                                                *gc, 
       
   895                                                                iViewRect, 
       
   896                                                                usedPortionOfViewRect );
       
   897     
       
   898                         if ( !sbbg.IsEmpty() )
       
   899                             {
       
   900                             AknsDrawUtils::Background( skin,
       
   901                                                        cc,
       
   902                                                        control,
       
   903                                                        *gc,
       
   904                                                        sbbg );
       
   905                             }
       
   906                         }
   949                         }
   907                     }
   950                     }
   908                 else
   951                 }
       
   952             else
       
   953                 {
       
   954                 iGc->SetBrushColor( BackColor() );
       
   955                 DrawUtils::ClearBetweenRects( *iGc, iViewRect, usedPortionOfViewRect );
       
   956                 iGc->Clear( sbbg );
       
   957                 
       
   958                 if ( AknLayoutUtils::LayoutMirrored() )
   909                     {
   959                     {
   910                     gc->SetBrushColor( BackColor() );
   960                     iGc->Clear( margin );
   911                     DrawUtils::ClearBetweenRects( *gc,
       
   912                                                   iViewRect,
       
   913                                                   usedPortionOfViewRect );
       
   914                     gc->Clear( sbbg );
       
   915                     }
   961                     }
   916                 }
   962                 }
       
   963             }
   917 
   964 
   918 #ifdef RD_UI_TRANSITION_EFFECTS_LIST  
   965 #ifdef RD_UI_TRANSITION_EFFECTS_LIST  
   919             if ( transApi )
   966     if ( transApi )
   920                 {
   967         {
   921                 transApi->StopDrawing();
   968         transApi->StopDrawing();
   922                 }
   969         }
   923 #endif //RD_UI_TRANSITION_EFFECTS_LIST      
   970 #endif //RD_UI_TRANSITION_EFFECTS_LIST      
   924 
   971 
   925             }
   972 
   926 
   973 		if ( CAknEnv::Static()->TransparencyEnabled() && !drawingInitiated )
   927 		if ( !drawingInitiated )
       
   928 			{
   974 			{
   929 			iWin->EndRedraw();
   975 			iWin->EndRedraw();
   930 			}
   976 			}
   931         }
   977         }
   932     _AKNTRACE_FUNC_EXIT;
   978     _AKNTRACE_FUNC_EXIT;
  1296 
  1342 
  1297 EXPORT_C void CFormattedCellListBoxItemDrawer::CFormattedCellListBoxItemDrawer_Reserved()
  1343 EXPORT_C void CFormattedCellListBoxItemDrawer::CFormattedCellListBoxItemDrawer_Reserved()
  1298     {
  1344     {
  1299     }
  1345     }
  1300 
  1346 
  1301 void CFormattedCellListBoxItemDrawer::DrawBackgroundAndSeparatorLines( 
  1347 void CFormattedCellListBoxItemDrawer::DrawBackgroundAndSeparatorLines( const TRect& aItemTextRect ) const
  1302         const TRect& aItemTextRect, TBool aDrawSeparator ) const
  1348     {
  1303     {
       
  1304     // If we get here background is drawn via avkon implementation -> raise the
       
  1305     // corresponding flag in item drawer.
       
  1306     const_cast<CFormattedCellListBoxItemDrawer*>( this )->SetFlags( ENativeImplementation );
       
  1307 
       
  1308     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
  1349     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
  1309     CCoeControl* control = FormattedCellData()->Control();
  1350     CCoeControl* control = FormattedCellData()->Control();
  1310     MAknsControlContext *cc = AknsDrawUtils::ControlContext( control );
  1351     MAknsControlContext *cc = AknsDrawUtils::ControlContext( control );
  1311     CEikListBox* listbox = static_cast<CEikListBox*>( control );
       
  1312 
  1352 
  1313     if ( !cc )
  1353     if ( !cc )
  1314         {
  1354         {
  1315         cc = FormattedCellData()->SkinBackgroundContext();
  1355         cc = FormattedCellData()->SkinBackgroundContext();
  1316         }
  1356         }
  1328             }
  1368             }
  1329         }
  1369         }
  1330 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  1370 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  1331 
  1371 
  1332     // background
  1372     // background
  1333     if ( FormattedCellData()->IsBackgroundDrawingEnabled() && listbox
  1373     if ( FormattedCellData()->IsBackgroundDrawingEnabled() )
  1334             && !listbox->BackgroundDrawingSuppressed() )
       
  1335         {
  1374         {
  1336 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  1375 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
  1337         MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc );
  1376         MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc );
  1338         if ( transApi )
  1377         if ( transApi )
  1339             {
  1378             {
  1349             if ( backgroundDrawer )
  1388             if ( backgroundDrawer )
  1350                 {
  1389                 {
  1351                 backgroundDrawer->Draw( *iGc, *control, aItemTextRect );
  1390                 backgroundDrawer->Draw( *iGc, *control, aItemTextRect );
  1352                 bgDrawn = ETrue;
  1391                 bgDrawn = ETrue;
  1353                 }
  1392                 }
  1354             else
  1393             else if ( CAknEnv::Static()->TransparencyEnabled() )
  1355                 {
  1394                 {
  1356                 bgDrawn = AknsDrawUtils::Background(
  1395                 bgDrawn = AknsDrawUtils::Background(
  1357                     skin, cc, control, *iGc, aItemTextRect,
  1396                     skin, cc, control, *iGc, aItemTextRect,
  1358                     KAknsDrawParamNoClearUnderImage );
  1397                     KAknsDrawParamNoClearUnderImage );
  1359                 }
  1398                 }
       
  1399             else
       
  1400                 {
       
  1401                 bgDrawn = AknsDrawUtils::Background(
       
  1402                     skin, cc, control, *iGc, aItemTextRect,
       
  1403                     KAknsDrawParamNoClearUnderImage | 
       
  1404                     KAknsDrawParamBottomLevelRGBOnly );
       
  1405                 }
  1360             }
  1406             }
  1361         if ( !bgDrawn )
  1407         if ( !bgDrawn )
  1362             {
  1408             {
  1363             iGc->Clear( aItemTextRect );
  1409             iGc->Clear( aItemTextRect );
  1364             }
  1410             }
  1367             {
  1413             {
  1368             transApi->StopDrawing();
  1414             transApi->StopDrawing();
  1369             }
  1415             }
  1370 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  1416 #endif // RD_UI_TRANSITION_EFFECTS_LIST
  1371         }
  1417         }
  1372 
       
  1373     if ( aDrawSeparator && listbox && 
       
  1374         listbox->ItemsInSingleLine() == 1 )
       
  1375         {
       
  1376         AknListUtils::DrawSeparator( *iGc, aItemTextRect, iTextColor, skin );
       
  1377         }
       
  1378     }
  1418     }
  1379 
  1419 
  1380 // End of File
  1420 // End of File