javauis/lcdui_akn/lcdui/src/CMIDDateFieldItem.cpp
branchRCL_3
changeset 59 e5618cc85d74
parent 34 71c436fe3ce0
child 60 6c158198356e
--- a/javauis/lcdui_akn/lcdui/src/CMIDDateFieldItem.cpp	Mon Jun 21 15:32:50 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDDateFieldItem.cpp	Thu Jul 15 18:31:06 2010 +0300
@@ -70,7 +70,9 @@
     }
     if (iEditor)
     {
+#ifndef RD_JAVA_S60_RELEASE_9_2
         iEditor->SetFocus(ETrue);   // needed to notify observers about editor destruction
+#endif // RD_JAVA_S60_RELEASE_9_2
         delete iEditor;
         iEditor = NULL;
     }
@@ -817,15 +819,11 @@
     iEditor->SetFocus(focus);
     if (focus)
     {
-        // Text colour from skin - focused
-        iEditor->SetSkinTextColorL(EAknsCIQsnTextColorsCG8);
         TRAP_IGNORE(iUIManager->OpenNaviPaneControllerL()->PauseTickerL(
                         TICKER_PAUSE_INTERVAL, this));
     }
     else
     {
-        // Text colour from skin - unfocused
-        iEditor->SetSkinTextColorL(EAknsCIQsnTextColorsCG6);
         TRAP_IGNORE(iUIManager->OpenNaviPaneControllerL()->PauseTickerL(
                         0, this));
 #ifdef RD_SCALABLE_UI_V2
@@ -833,6 +831,8 @@
 #endif
     }
 
+    TRAP_IGNORE(UpdateTextColorsL());
+
     CMIDControlItem::FocusChanged(aDrawNow);
 
     DoSafeDraw();
@@ -952,4 +952,20 @@
     }
 }
 
+void CMIDDateFieldItem::UpdateTextColorsL()
+{
+    // Set color for content text according to item highlight
+    // (logical color constants are defined in lcdui.h)
+    if (iHighlighted)
+    {
+        // Text colour from skin - highlighted
+        iEditor->SetSkinTextColorL(KHighlightedItemTextColor);
+    }
+    else
+    {
+        // Text colour from skin - unfocused
+        iEditor->SetSkinTextColorL(KNonHighlightedItemTextColor);
+    }
+}
+
 // End of File