uifw/AvKon/src/akninfrm.cpp
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
child 72 a5e7a4f63858
--- a/uifw/AvKon/src/akninfrm.cpp	Tue Aug 31 15:28:30 2010 +0300
+++ b/uifw/AvKon/src/akninfrm.cpp	Wed Sep 01 12:16:19 2010 +0100
@@ -276,11 +276,12 @@
     TRect rect( Rect() );         // rect of the whole shebang
     TAknLayoutRect r;            // common temporary layout rect
 
-    TAknWindowComponentLayout outline(0);
-    TAknWindowLineLayout      iconPos(0);
-    TAknTextComponentLayout   editor(0);
+    TBool apac( AknLayoutUtils::Variant() == EApacVariant && ( iFlags & EShowIndicators ) );
+    
+    TAknWindowComponentLayout outline = AknLayoutScalable_Avkon::input_find_pane();
+    TAknWindowLineLayout iconPos = AknLayoutScalable_Avkon::find_popup_pane_g1().LayoutLine();
+    TAknTextComponentLayout   editor = AknLayoutScalable_Avkon::input_popup_find_pane_t1( apac ? 2 : 0 );
 
-    TBool apac( AknLayoutUtils::Variant() == EApacVariant && ( iFlags & EShowIndicators ) );
 
     if ( iFlags & EPopupLayout ) // popup find box 
         {
@@ -352,11 +353,18 @@
         // we need to provide own context if one does not exist
         // because old style drawing did kind of work even
         // without calling SetInputContext( ... )
-        iInputContext = CAknsFrameBackgroundControlContext::NewL(
-            KAknsIIDQsnFrInput, TRect(0,0,0,0), TRect(0,0,0,0), EFalse );
-        iFlags = iFlags | EOwnsInputContext;
-        // also need to provide skin for the editor in this case
-        static_cast<CEikEdwin*>( iField )->SetSkinBackgroundControlContextL( iInputContext );
+        TRAP_IGNORE
+            ( 
+            iInputContext = CAknsFrameBackgroundControlContext::NewL(
+                    KAknsIIDQsnFrInput, TRect(0,0,0,0), TRect(0,0,0,0), EFalse);
+        
+            if (iInputContext)
+                {
+                iFlags = iFlags | EOwnsInputContext;
+                // also need to provide skin for the editor in this case
+                static_cast<CEikEdwin*>( iField )->SetSkinBackgroundControlContextL( iInputContext );  
+                }
+            );
         }
 
     if ( iInputContext )
@@ -508,7 +516,7 @@
         {
         case KAknsMessageSkinChange:
         case KEikDynamicLayoutVariantSwitch:
-            CreateIconL();
+            TRAP_IGNORE(CreateIconL());
             break;
             
         default: