uifw/AvKon/src/AknPhedView.cpp
branchRCL_3
changeset 25 941195f2d488
parent 0 2f259fa3e83a
child 55 aecbbf00d063
equal deleted inserted replaced
23:3d340a0166ff 25:941195f2d488
   497                                  TInt aBaseline, 
   497                                  TInt aBaseline, 
   498                                  TRect& aRect) const
   498                                  TRect& aRect) const
   499     {
   499     {
   500     TRgb color = KRgbBlack;
   500     TRgb color = KRgbBlack;
   501     AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
   501     AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
   502                 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG51 );
   502                 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
   503     aGc.SetPenColor( color );
   503     aGc.SetPenColor( color );
   504     // This function shifts the RHS of aRect left by the width of the text drawn.
   504     // This function shifts the RHS of aRect left by the width of the text drawn.
   505     // It temporarily limits the draw rectangle to the text width to prevent flicker.
   505     // It temporarily limits the draw rectangle to the text width to prevent flicker.
   506     TPtr buf( TranslatedText( aText ) );
   506     TPtr buf( TranslatedText( aText ) );
   507     
   507     
   521                                                 TRect& aRect ) const
   521                                                 TRect& aRect ) const
   522     {
   522     {
   523     TRgb color;
   523     TRgb color;
   524     color = KRgbBlack;
   524     color = KRgbBlack;
   525     AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
   525     AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
   526                 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG51 );
   526                 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
   527     aGc.SetPenColor( color );
   527     aGc.SetPenColor( color );
   528     TPtr buf( TranslatedText( aText ) );
   528     TPtr buf( TranslatedText( aText ) );
   529     aGc.DrawText( buf, aRect, aBaseline, CGraphicsContext::ERight );
   529     aGc.DrawText( buf, aRect, aBaseline, CGraphicsContext::ERight );
   530     }
   530     }
   531 
   531 
   572     aGc.SetBrushStyle( CGraphicsContext::ESolidBrush );
   572     aGc.SetBrushStyle( CGraphicsContext::ESolidBrush );
   573     aGc.SetBrushColor( brushColor );
   573     aGc.SetBrushColor( brushColor );
   574     aGc.DrawRect( rect );
   574     aGc.DrawRect( rect );
   575     aGc.SetPenStyle( CGraphicsContext::ESolidPen );
   575     aGc.SetPenStyle( CGraphicsContext::ESolidPen );
   576     aGc.SetPenColor( penColor );
   576     aGc.SetPenColor( penColor );
   577     TInt selStart( iModel->LeftMark() );
       
   578     TInt endPos( iModel->Length() - SelectionStart() );
   577     TInt endPos( iModel->Length() - SelectionStart() );
   579     TInt startPos( iModel->Length() - SelectionEnd() );
   578     TInt startPos( iModel->Length() - SelectionEnd() );
   580     TPtrC text( TranslatedText( iModel->Selection().Mid( startPos - selStart, 
   579     TPtrC text( TranslatedText( iModel->Text( startPos, endPos - 1 ) ) );
   581         endPos - startPos ) ) );
   580     aGc.DrawText( text, rect, baseline, CGraphicsContext::ELeft );
   582     aGc.DrawText( text, rect, baseline, CGraphicsContext::ERight );
       
   583     }
   581     }
   584 
   582 
   585 TPtr TAknPhedViewLine::TranslatedText( const TDesC& aText ) const
   583 TPtr TAknPhedViewLine::TranslatedText( const TDesC& aText ) const
   586     {
   584     {
   587     TPtr buf( iModel->TranslationBuffer() );
   585     TPtr buf( iModel->TranslationBuffer() );