javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistboxlists.cpp
changeset 23 98ccebc37403
parent 21 2a9601315dfc
child 34 71c436fe3ce0
--- a/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistboxlists.cpp	Mon May 03 12:27:20 2010 +0300
+++ b/javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/src/swtlistboxlists.cpp	Fri May 14 15:47:24 2010 +0300
@@ -204,20 +204,25 @@
                 && aSbFrame->ScrollBarVisibility(CEikScrollBar::EVertical)
                 != CEikScrollBarFrame::EOff)
         {
+            TInt breadth(0);
+            if (iListObserver)
+            {
+                breadth = iListObserver->Utils().ScrollBarBreadth(
+                              aSbFrame->VerticalScrollBar());
+            }
+            else
+            {
+                breadth = aSbFrame->ScrollBarBreadth(CEikScrollBar::EVertical);
+            }
+
             if (!AknLayoutUtils::LayoutMirrored())
             {
-                TInt breadth(0);
-                if (iListObserver)
-                {
-                    breadth = iListObserver->Utils().ScrollBarBreadth(
-                                  aSbFrame->VerticalScrollBar());
-                }
-                else
-                {
-                    breadth = aSbFrame->ScrollBarBreadth(CEikScrollBar::EVertical);
-                }
                 clientRect.iBr.iX -= breadth;
             }
+            else
+            {
+                clientRect.iTl.iX += breadth;
+            }
         }
     }
 
@@ -471,6 +476,34 @@
     }
 }
 
+// ---------------------------------------------------------------------------
+// CSwtListBoxLists::EnableStretching
+// ---------------------------------------------------------------------------
+//
+void CSwtListBoxLists::EnableStretching(TInt aListType, CEikTextListBox* aList,
+                                        TBool aEnabled)
+{
+    ASSERT(IsListType(aListType));
+
+    switch (aListType)
+    {
+    case ESwtLbDouble:
+        STATIC_CAST(CSwtListBoxDouble*, aList)
+        ->EnableStretching(aEnabled);
+        break;
+    case ESwtLbDoubleGraphic:
+        STATIC_CAST(CSwtListBoxDoubleGraphic*, aList)
+        ->EnableStretching(aEnabled);
+        break;
+    case ESwtLbDoubleLarge:
+        STATIC_CAST(CSwtListBoxDoubleLarge*, aList)
+        ->EnableStretching(aEnabled);
+        break;
+    default:
+        // Other list types are not supported
+        break;
+    }
+}
 
 // The compiler does not automatically instantiate templates defined in other
 // files. Because of this, code written will often produce undefined symbol