src/gui/inputmethod/qcoefepinputcontext_s60.cpp
changeset 25 e24348a560a6
parent 22 79de32ba3296
child 33 3e2da88830cd
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp	Thu May 27 13:40:48 2010 +0300
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp	Fri Jun 11 14:24:45 2010 +0300
@@ -87,7 +87,7 @@
     m_fepState->SetDefaultInputMode( EAknEditorTextInputMode );
     m_fepState->SetPermittedInputModes( EAknEditorAllInputModes );
     m_fepState->SetDefaultCase( EAknEditorLowerCase );
-    m_fepState->SetPermittedCases( EAknEditorLowerCase|EAknEditorUpperCase );
+    m_fepState->SetPermittedCases( EAknEditorAllCaseModes );
     m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
     m_fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap );
 }
@@ -484,9 +484,10 @@
 void QCoeFepInputContext::applyFormat(QList<QInputMethodEvent::Attribute> *attributes)
 {
     TCharFormat cFormat;
-    QColor styleTextColor = QApplication::palette("QLineEdit").text().color();
-    TLogicalRgb tontColor(TRgb(styleTextColor.red(), styleTextColor.green(), styleTextColor.blue(), styleTextColor.alpha()));
-    cFormat.iFontPresentation.iTextColor = tontColor;
+    const QColor styleTextColor = focusWidget() ? focusWidget()->palette().text().color() : 
+        QApplication::palette("QLineEdit").text().color();
+    const TLogicalRgb fontColor(TRgb(styleTextColor.red(), styleTextColor.green(), styleTextColor.blue(), styleTextColor.alpha()));
+    cFormat.iFontPresentation.iTextColor = fontColor;
 
     TInt numChars = 0;
     TInt charPos = 0;