src/gui/inputmethod/qcoefepinputcontext_s60.cpp
changeset 25 e24348a560a6
parent 22 79de32ba3296
child 33 3e2da88830cd
equal deleted inserted replaced
23:89e065397ea6 25:e24348a560a6
    85     else
    85     else
    86         m_fepState->SetFlags(EAknEditorFlagDefault);
    86         m_fepState->SetFlags(EAknEditorFlagDefault);
    87     m_fepState->SetDefaultInputMode( EAknEditorTextInputMode );
    87     m_fepState->SetDefaultInputMode( EAknEditorTextInputMode );
    88     m_fepState->SetPermittedInputModes( EAknEditorAllInputModes );
    88     m_fepState->SetPermittedInputModes( EAknEditorAllInputModes );
    89     m_fepState->SetDefaultCase( EAknEditorLowerCase );
    89     m_fepState->SetDefaultCase( EAknEditorLowerCase );
    90     m_fepState->SetPermittedCases( EAknEditorLowerCase|EAknEditorUpperCase );
    90     m_fepState->SetPermittedCases( EAknEditorAllCaseModes );
    91     m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
    91     m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
    92     m_fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap );
    92     m_fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap );
    93 }
    93 }
    94 
    94 
    95 QCoeFepInputContext::~QCoeFepInputContext()
    95 QCoeFepInputContext::~QCoeFepInputContext()
   482 }
   482 }
   483 
   483 
   484 void QCoeFepInputContext::applyFormat(QList<QInputMethodEvent::Attribute> *attributes)
   484 void QCoeFepInputContext::applyFormat(QList<QInputMethodEvent::Attribute> *attributes)
   485 {
   485 {
   486     TCharFormat cFormat;
   486     TCharFormat cFormat;
   487     QColor styleTextColor = QApplication::palette("QLineEdit").text().color();
   487     const QColor styleTextColor = focusWidget() ? focusWidget()->palette().text().color() : 
   488     TLogicalRgb tontColor(TRgb(styleTextColor.red(), styleTextColor.green(), styleTextColor.blue(), styleTextColor.alpha()));
   488         QApplication::palette("QLineEdit").text().color();
   489     cFormat.iFontPresentation.iTextColor = tontColor;
   489     const TLogicalRgb fontColor(TRgb(styleTextColor.red(), styleTextColor.green(), styleTextColor.blue(), styleTextColor.alpha()));
       
   490     cFormat.iFontPresentation.iTextColor = fontColor;
   490 
   491 
   491     TInt numChars = 0;
   492     TInt numChars = 0;
   492     TInt charPos = 0;
   493     TInt charPos = 0;
   493     int oldSize = attributes->size();
   494     int oldSize = attributes->size();
   494     while (m_formatRetriever) {
   495     while (m_formatRetriever) {