javauis/lcdui_akn/lcdui/src/CMIDTextFieldItem.cpp
branchRCL_3
changeset 59 e5618cc85d74
parent 46 4376525cdefb
child 60 6c158198356e
--- a/javauis/lcdui_akn/lcdui/src/CMIDTextFieldItem.cpp	Mon Jun 21 15:32:50 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDTextFieldItem.cpp	Thu Jul 15 18:31:06 2010 +0300
@@ -345,6 +345,7 @@
     CMIDControlItem::FocusChanged(aDrawNow);
     // DoLayout and change text color when focused
     SizeChanged();
+    TRAP_IGNORE(UpdateTextColorsL());
 }
 
 void CMIDTextFieldItem::HandleCurrentL(TBool aCurrent)
@@ -672,3 +673,21 @@
     }
 }
 
+void CMIDTextFieldItem::UpdateTextColorsL()
+{
+    if (iTextField)
+    {
+        // Set color for content text according to item highlight
+        // (logical color constants are defined in lcdui.h)
+        if (iHighlighted)
+        {
+            // Text colour from skin - highlighted
+            iTextField->SetTextSkinColorIdL(KHighlightedItemTextColor);
+        }
+        else
+        {
+            // Text colour from skin - unfocused
+            iTextField->SetTextSkinColorIdL(KNonHighlightedItemTextColor);
+        }
+    }
+}