idlehomescreen/widgetmanager/src/wmlistbox.cpp
branchRCL_3
changeset 93 b01126ce0bec
parent 83 5456b4e8b3a8
child 102 ba63c83f4716
equal deleted inserted replaced
88:3321d3e205b6 93:b01126ce0bec
   182     CWmWidgetData& wData = iListBox->WidgetData( aItemIndex );
   182     CWmWidgetData& wData = iListBox->WidgetData( aItemIndex );
   183     // Get graphics context which is used for drawing.
   183     // Get graphics context which is used for drawing.
   184     CWindowGc& gc = *Gc();
   184     CWindowGc& gc = *Gc();
   185     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
   185     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
   186     TBool highlightEnabled = !( iListBox->ItemDrawer()->Flags() & 
   186     TBool highlightEnabled = !( iListBox->ItemDrawer()->Flags() & 
   187             CListItemDrawer::ESingleClickDisabledHighlight );
   187             CListItemDrawer::ESingleClickDisabledHighlight );    
   188     TBool listFocused = ((iListBox->IsFocused() && !aViewIsDimmed) ? ETrue : EFalse);
       
   189     TRect itemRect = TRect( aItemRectPos, cellSize );
   188     TRect itemRect = TRect( aItemRectPos, cellSize );
   190     
   189     
   191     CFormattedCellListBoxItemDrawer::DrawEmptyItem( 
   190     CFormattedCellListBoxItemDrawer::DrawEmptyItem( 
   192                             aItemIndex, aItemRectPos, aViewIsDimmed );
   191                             aItemIndex, aItemRectPos, aViewIsDimmed );
   193     
   192     
   194     if ( aItemIsCurrent && listFocused && highlightEnabled )
   193     if ( aItemIsCurrent && !aViewIsDimmed && highlightEnabled )
   195         {
   194         {
   196         TRect innerRect( itemRect );
   195         TRect innerRect( itemRect );
   197         const TInt highlightOffset = 5;
   196         const TInt highlightOffset = 5;
   198         innerRect.Shrink( highlightOffset, highlightOffset );
   197         innerRect.Shrink( highlightOffset, highlightOffset );
   199         
   198         
   239         }
   238         }
   240 
   239 
   241     // DRAW NAME
   240     // DRAW NAME
   242     TRgb textColor;
   241     TRgb textColor;
   243     TAknsQsnTextColorsIndex index =
   242     TAknsQsnTextColorsIndex index =
   244         ( aItemIsCurrent && listFocused && highlightEnabled )? 
   243         ( aItemIsCurrent && aViewIsDimmed && highlightEnabled )? 
   245                 EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG6;
   244                 EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG6;
   246 
   245 
   247     AknsUtils::GetCachedColor( 
   246     AknsUtils::GetCachedColor( 
   248                     skin, textColor, KAknsIIDQsnTextColors, index );
   247                     skin, textColor, KAknsIIDQsnTextColors, index );
   249 
   248