idlehomescreen/widgetmanager/src/wmlistbox.cpp
branchRCL_3
changeset 102 ba63c83f4716
parent 93 b01126ce0bec
equal deleted inserted replaced
93:b01126ce0bec 102:ba63c83f4716
   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);
   188     TRect itemRect = TRect( aItemRectPos, cellSize );
   189     TRect itemRect = TRect( aItemRectPos, cellSize );
   189     
   190     
   190     CFormattedCellListBoxItemDrawer::DrawEmptyItem( 
   191     CFormattedCellListBoxItemDrawer::DrawEmptyItem( 
   191                             aItemIndex, aItemRectPos, aViewIsDimmed );
   192                             aItemIndex, aItemRectPos, aViewIsDimmed );
   192     
   193     
   193     if ( aItemIsCurrent && !aViewIsDimmed && highlightEnabled )
   194     if ( aItemIsCurrent && listFocused && highlightEnabled )
   194         {
   195         {
   195         TRect innerRect( itemRect );
   196         TRect innerRect( itemRect );
   196         const TInt highlightOffset = 5;
   197         const TInt highlightOffset = 5;
   197         innerRect.Shrink( highlightOffset, highlightOffset );
   198         innerRect.Shrink( highlightOffset, highlightOffset );
   198         
   199         
   238         }
   239         }
   239 
   240 
   240     // DRAW NAME
   241     // DRAW NAME
   241     TRgb textColor;
   242     TRgb textColor;
   242     TAknsQsnTextColorsIndex index =
   243     TAknsQsnTextColorsIndex index =
   243         ( aItemIsCurrent && aViewIsDimmed && highlightEnabled )? 
   244         ( aItemIsCurrent && listFocused && highlightEnabled )? 
   244                 EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG6;
   245                 EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG6;
   245 
   246 
   246     AknsUtils::GetCachedColor( 
   247     AknsUtils::GetCachedColor( 
   247                     skin, textColor, KAknsIIDQsnTextColors, index );
   248                     skin, textColor, KAknsIIDQsnTextColors, index );
   248 
   249