phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercustomlistboxitemdrawer.cpp
equal
deleted
inserted
replaced
154 colors.iText=iTextColor; |
154 colors.iText=iTextColor; |
155 colors.iBack=iBackColor; |
155 colors.iBack=iBackColor; |
156 colors.iHighlightedText=iHighlightedTextColor; |
156 colors.iHighlightedText=iHighlightedTextColor; |
157 colors.iHighlightedBack=iHighlightedBackColor; |
157 colors.iHighlightedBack=iHighlightedBackColor; |
158 |
158 |
159 DrawBackgroundAndSeparatorLines( aItemTextRect ); |
159 DrawBackgroundAndSeparatorLines( aItemTextRect, |
160 |
160 aItemIndex != FormattedCellData()->ListBox()->BottomItemIndex() ); |
161 // Draw separator line except last item |
|
162 if ( aItemIndex < iModel->NumberOfItems() - 1 ) |
|
163 { |
|
164 DrawSeparator( *iGc, aItemTextRect, iTextColor); |
|
165 } |
|
166 |
161 |
167 TBool highlightShown = ETrue; |
162 TBool highlightShown = ETrue; |
168 |
163 |
169 if (FormattedCellData()->RespectFocus() && !aViewIsEmphasized) |
164 if (FormattedCellData()->RespectFocus() && !aViewIsEmphasized) |
170 { |
165 { |
390 |
385 |
391 void CCCAppCommLauncherCustomListBoxItemDrawer::CCCAppCommLauncherCustomListBoxItemDrawer_Reserved() |
386 void CCCAppCommLauncherCustomListBoxItemDrawer::CCCAppCommLauncherCustomListBoxItemDrawer_Reserved() |
392 { |
387 { |
393 } |
388 } |
394 |
389 |
395 void CCCAppCommLauncherCustomListBoxItemDrawer::DrawBackgroundAndSeparatorLines( const TRect& aItemTextRect ) const |
390 void CCCAppCommLauncherCustomListBoxItemDrawer::DrawBackgroundAndSeparatorLines( |
|
391 const TRect& aItemTextRect, TBool aDrawSeparator ) const |
396 { |
392 { |
397 MAknsSkinInstance *skin = AknsUtils::SkinInstance(); |
393 MAknsSkinInstance *skin = AknsUtils::SkinInstance(); |
398 CCoeControl* control = FormattedCellData()->Control(); |
394 CCoeControl* control = FormattedCellData()->Control(); |
399 MAknsControlContext *cc = AknsDrawUtils::ControlContext( control ); |
395 MAknsControlContext *cc = AknsDrawUtils::ControlContext( control ); |
400 |
396 |
459 if ( transApi ) |
455 if ( transApi ) |
460 { |
456 { |
461 transApi->StopDrawing(); |
457 transApi->StopDrawing(); |
462 } |
458 } |
463 #endif // RD_UI_TRANSITION_EFFECTS_LIST |
459 #endif // RD_UI_TRANSITION_EFFECTS_LIST |
|
460 if ( aDrawSeparator && |
|
461 static_cast<CEikListBox*>( control )->ItemsInSingleLine() == 1 ) |
|
462 { |
|
463 AknListUtils::DrawSeparator( *iGc, aItemTextRect, iTextColor ); |
|
464 } |
464 } |
465 } |
465 } |
466 } |
466 |
467 |
467 void CCCAppCommLauncherCustomListBoxItemDrawer::DrawSeparator( CGraphicsContext& aGc, const TRect& aRect, const TRgb& aColor ) const |
|
468 { |
|
469 aGc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
470 aGc.SetPenStyle( CGraphicsContext::ESolidPen ); |
|
471 |
|
472 TRgb color( aColor ); |
|
473 color.SetAlpha( 32 ); |
|
474 aGc.SetPenColor( color ); |
|
475 |
|
476 TRect lineRect( aRect ); |
|
477 TInt gap = AknLayoutScalable_Avkon::listscroll_gen_pane( 0 ).LayoutLine().it; |
|
478 lineRect.Shrink( gap, 0 ); |
|
479 lineRect.Move( 0, -1 ); |
|
480 |
|
481 aGc.DrawLine( TPoint( lineRect.iTl.iX, lineRect.iBr.iY ), |
|
482 TPoint( lineRect.iBr.iX, lineRect.iBr.iY ) ); |
|
483 } |
|
484 // End of File |
468 // End of File |