javauis/lcdui_akn/lcdui/src/CMIDForm.cpp
branchRCL_3
changeset 59 e5618cc85d74
parent 25 9ac0a0a7da70
child 60 6c158198356e
--- a/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp	Mon Jun 21 15:32:50 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp	Thu Jul 15 18:31:06 2010 +0300
@@ -181,6 +181,12 @@
     {
         SetFocusedItem(ci.IsSelectable() ? aIndex : KErrNotFound);
     }
+    else if (aIndex <= iFocused)
+    {
+        // If new item is inserted to Form above the current item,
+        // index must increase
+        iFocused++;
+    }
 
     RequestLayoutL();
 }
@@ -1977,6 +1983,8 @@
     { // actions for the item loosing focus
         CMIDControlItem& control = ControlItem(iFocused);
         control.PostFocusTransferEvent(EFalse, aDirection);
+        // setting highlight must be called before setting focus
+        control.SetHighlight(EFalse);
         control.SetFocus(EFalse);
         UpdateItemCommands(NULL, NULL);
     }
@@ -2009,6 +2017,7 @@
         SetHighlightBackgroundRects();
 
         control.PostFocusTransferEvent(ETrue, aDirection);
+        control.SetHighlight(ETrue);
         control.SetFocus(ETrue);
         // msk: deliver also the possible MSK command to displayable
         UpdateItemCommands(control.CommandList(), control.GetMSKCommand());
@@ -2305,7 +2314,11 @@
 
     // Background for highlighted item, frame rects are set later
     iHighlightedBackgroundCc = CAknsFrameBackgroundControlContext::NewL(
+#ifdef RD_JAVA_S60_RELEASE_9_2
+                                   KAknsIIDQsnFrPopupPreview,
+#else
                                    KAknsIIDQsnFrInput,
+#endif // RD_JAVA_S60_RELEASE_9_2
                                    TRect(), TRect(), ETrue);
 
     iDisplayable.SetComponentL(*this);