commsconfig/cscapplicationui/src/cscservicecontainer.cpp
branchRCL_3
changeset 11 6134b5029079
parent 9 bddb6d4447db
child 18 8c9c07ad8b6b
--- a/commsconfig/cscapplicationui/src/cscservicecontainer.cpp	Wed Mar 31 21:20:05 2010 +0300
+++ b/commsconfig/cscapplicationui/src/cscservicecontainer.cpp	Wed Apr 14 15:49:55 2010 +0300
@@ -220,14 +220,19 @@
             uiPlugins.AppendL( uiExtension );
             }
         }
-
-    const TInt itemHeight( iListBox->ItemHeight() );
-    TInt iconSize( KIconSizeQvgaPortrait ); // Default icon size (QVGA portrait).
-    if ( KItemHeightQvgaLandscape == itemHeight ) // QVGA landscape
+  
+    iListBoxItemHeight = iListBox->ItemHeight();
+    
+    TInt iconSize( 0 );
+    if ( iListBoxItemHeight == KItemHeightPortrait )
         {
-        iconSize = KIconSizeQvgaLandscape;
+        iconSize = iListBoxItemHeight - KIconSizeCorrectionPortrait;
         }
-               
+    else
+        {
+        iconSize = iListBoxItemHeight - KIconSizeCorrectionLandscape;
+        }
+                 
     for ( TUint i( 0 ) ; i < iUiExtensionCount ; i++ )
         {
         TUiExtensionPluginInfo uiExtension = uiPlugins[i];
@@ -751,6 +756,12 @@
     if ( iListBox )
         {
         iListBox->SetRect( Rect() );
+        
+        // Update view if portrait/landscape change happened
+        if ( iListBoxItemHeight != iListBox->ItemHeight() )
+            {
+            TRAP_IGNORE( UpdateServiceViewL() );
+            }        
         }
     }