Revision: 201019 RCL_3 PDK_3.0.0
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 13:16:14 +0300
branchRCL_3
changeset 15 125793e17004
parent 14 03228bb411ae
child 17 514d98f21c43
Revision: 201019 Kit: 2010121
mulwidgets/gesturehelper/src/gesturehelperimpl.cpp
mulwidgets/mulcoverflowwidget/src/mulcoverflowcontrol.cpp
mulwidgets/mulsliderwidget/inc/mulslidervertical.h
mulwidgets/mulsliderwidget/src/mulslidercontrol.cpp
mulwidgets/mulsliderwidget/src/mulsliderutils.cpp
mulwidgets/mulsliderwidget/src/mulverticalslider.cpp
--- a/mulwidgets/gesturehelper/src/gesturehelperimpl.cpp	Tue May 11 16:42:11 2010 +0300
+++ b/mulwidgets/gesturehelper/src/gesturehelperimpl.cpp	Tue May 25 13:16:14 2010 +0300
@@ -338,7 +338,16 @@
         case TPointerEvent::EDrag:
             if(iPointerCount == 1)
                 {
-                HandleSinglePointerEventL( aEvent, aVisual );
+                if(pointerNumber == iCurrentPointer)
+                    {
+                    HandleSinglePointerEventL( aEvent, aVisual );
+                    }
+                else
+                    {
+                    // only the drags on the current pointer should be considered.
+                    return EFalse;
+                    }
+                
                 }
             else if(iPointerCount == 2)
                 {
--- a/mulwidgets/mulcoverflowwidget/src/mulcoverflowcontrol.cpp	Tue May 11 16:42:11 2010 +0300
+++ b/mulwidgets/mulcoverflowwidget/src/mulcoverflowcontrol.cpp	Tue May 25 13:16:14 2010 +0300
@@ -795,7 +795,15 @@
 void MulCoverFlowControl::HandleLessItemsUpdate(int aIndex)
 	{
 	MUL_LOG_ENTRY_EXIT("MUL:MulCoverFlowControl::HandleLessItemsUpdate");
-	if(aIndex == mData->mHighlightIndex)
+
+	int highlight = mData->mHighlightIndex;
+    IMulModelAccessor* accessor = static_cast<IMulModelAccessor*>(widget()->model());
+    if(accessor)
+        {
+        highlight = accessor->Highlight();
+        }
+    
+	if(aIndex == highlight)
 		{
 		UpdateCoverflowItem(aIndex,mData->mNumVisibleItem);
 		if(mData->mNumVisibleItem != 1 && TotalModelCount() == 3)	
@@ -817,11 +825,11 @@
 			// 2d template landscape mode
 			if(TotalModelCount() == 2)
 				{
-				UpdateCoverflowItem(aIndex,mData->mNumVisibleItem+(aIndex - mData->mHighlightIndex));	
+				UpdateCoverflowItem(aIndex,mData->mNumVisibleItem+(aIndex - highlight));	
 				}
 			else
 				{
-				int relativeIndex = (aIndex - mData->mHighlightIndex) + mData->mNumVisibleItem;
+				int relativeIndex = (aIndex - highlight) + mData->mNumVisibleItem;
 				if(relativeIndex >= 0 && relativeIndex < 2*mData->mNumVisibleItem+1)
 					{
 					UpdateCoverflowItem(aIndex,relativeIndex);						
@@ -832,7 +840,7 @@
 					UpdateCoverflowItem(aIndex,relativeIndex);	
 					}
 								
-				relativeIndex = mData->mNumVisibleItem - (TotalModelCount() - aIndex + mData->mHighlightIndex);
+				relativeIndex = mData->mNumVisibleItem - (TotalModelCount() - aIndex + highlight);
 				if(relativeIndex >= 0 && relativeIndex < 2*mData->mNumVisibleItem+1)
 					{
 					UpdateCoverflowItem(aIndex,relativeIndex);					
@@ -858,23 +866,29 @@
 	int totalVisual = TotalModelCount();
     int noOfVisuals = mData->mNumVisibleItem; 
     int highlightRelativeIndex = mData->mNumVisibleItem;
-    	
-	int leftIndex = mData->mHighlightIndex - noOfVisuals;
-	int rightIndex = mData->mHighlightIndex + noOfVisuals;
+    int highlight = mData->mHighlightIndex;
+    IMulModelAccessor* accessor = static_cast<IMulModelAccessor*>(widget()->model());
+    if(accessor)
+        {
+        highlight = accessor->Highlight();
+        }
+
+	int leftIndex = highlight - noOfVisuals;
+	int rightIndex = highlight + noOfVisuals;
     
  	if (leftIndex >= 0)
 	 	{
-	 	if ((aIndex <= mData->mHighlightIndex) && (aIndex >= leftIndex))
+	 	if ((aIndex <= highlight) && (aIndex >= leftIndex))
 		 	{
-		 	aRelativeIndex = highlightRelativeIndex - (mData->mHighlightIndex - aIndex);
+		 	aRelativeIndex = highlightRelativeIndex - (highlight - aIndex);
 		 	return true;	
 		 	}
 	 	}
 	else
 		{
-		if (aIndex <= mData->mHighlightIndex)
+		if (aIndex <= highlight)
 			{
-			aRelativeIndex = highlightRelativeIndex - (mData->mHighlightIndex - aIndex);
+			aRelativeIndex = highlightRelativeIndex - (highlight - aIndex);
 			return true;	
 			}
 		else
@@ -890,17 +904,17 @@
  
  	if (rightIndex < totalVisual)
 	 	{
-	 	if ((aIndex >= mData->mHighlightIndex) && (aIndex <= rightIndex))
+	 	if ((aIndex >= highlight) && (aIndex <= rightIndex))
 		 	{
-		 	aRelativeIndex = highlightRelativeIndex + (aIndex - mData->mHighlightIndex);
+		 	aRelativeIndex = highlightRelativeIndex + (aIndex - highlight);
 		 	return true;	
 		 	}
 	 	}
 	else
 		{
-		if (aIndex >= mData->mHighlightIndex)
+		if (aIndex >= highlight)
 			{
-			aRelativeIndex = highlightRelativeIndex + (aIndex - mData->mHighlightIndex);
+			aRelativeIndex = highlightRelativeIndex + (aIndex - highlight);
 			return true;	
 			}
 		rightIndex = rightIndex - totalVisual;
@@ -925,6 +939,14 @@
     int highlightRelativeIndex = mData->mNumVisibleItem;
     int absolute = -1;
     int totalVisuals = TotalModelCount();
+    
+    int highlight = mData->mHighlightIndex;
+    IMulModelAccessor* accessor = static_cast<IMulModelAccessor*>(widget()->model());
+    if(accessor)
+        {
+        highlight = accessor->Highlight();
+        }
+    
     if(totalVisuals <= 0)
 	    {
 	    // absolute index is always -1, so no need of any calculations
@@ -933,7 +955,7 @@
 	    {
 	    if(aRelativeIndex == highlightRelativeIndex)
 			{
-			absolute = 	mData->mHighlightIndex;
+			absolute = 	highlight;
 			}
 		else
 			{
@@ -945,7 +967,7 @@
 				    }
 				else if(totalVisuals == 2)
 					{
-					absolute = mData->mHighlightIndex + 1;
+					absolute = highlight + 1;
 					absolute = absolute >= totalVisuals ? 0 : absolute;
 					}
 				}
@@ -957,18 +979,18 @@
 				    }
 				else if(totalVisuals == 2)
 					{
-					absolute = mData->mHighlightIndex + (aRelativeIndex - highlightRelativeIndex);
+					absolute = highlight + (aRelativeIndex - highlightRelativeIndex);
 					absolute = absolute >= totalVisuals ? -1 : absolute;
 					}
 				else // totalvisuals > 3
 					{
 					if(aRelativeIndex - highlightRelativeIndex > 0)
 						{
-						absolute = mData->mHighlightIndex + aRelativeIndex - highlightRelativeIndex;	
+						absolute = highlight + aRelativeIndex - highlightRelativeIndex;	
 						}
 					else
 						{
-						absolute = mData->mHighlightIndex + aRelativeIndex - highlightRelativeIndex
+						absolute = highlight + aRelativeIndex - highlightRelativeIndex
 							+ TotalModelCount();	
 						}					
 					absolute = absolute >= totalVisuals ? absolute - totalVisuals : absolute;
@@ -980,16 +1002,16 @@
 		{
 		if(aRelativeIndex == highlightRelativeIndex)
 			{
-			absolute = 	mData->mHighlightIndex;
+			absolute = highlight;
 			}
 		else if (aRelativeIndex > highlightRelativeIndex)
 		    {
-		    absolute = mData->mHighlightIndex + (aRelativeIndex - highlightRelativeIndex);
+		    absolute = highlight + (aRelativeIndex - highlightRelativeIndex);
 		    absolute = absolute >= totalVisuals ? (absolute - totalVisuals) : absolute;	
 		    }
 		else
 			{
-		    absolute = mData->mHighlightIndex - (highlightRelativeIndex - aRelativeIndex);
+		    absolute = highlight - (highlightRelativeIndex - aRelativeIndex);
 		    absolute = absolute <0 ? (totalVisuals + absolute) : absolute;
 		    absolute = absolute > totalVisuals - 1 ? -1 : absolute;	    
 			}	
@@ -1059,8 +1081,9 @@
 	mData->mHighlightIndex = aAccessor->Highlight();
 
 	CAlfLayout* main = (CAlfLayout*) mData->mBaseElement->findVisual( KMainLayoutIndex );
-	int width = main->Size().Target().AsSize().iWidth;
-	int height = main->Size().Target().AsSize().iHeight;
+	TSize mainSize = main->Size().Target().AsSize();
+	int width = mainSize.iWidth;
+	int height = mainSize.iHeight;
 
 	if( width == 0 && height == 0 )
 		{
--- a/mulwidgets/mulsliderwidget/inc/mulslidervertical.h	Tue May 11 16:42:11 2010 +0300
+++ b/mulwidgets/mulsliderwidget/inc/mulslidervertical.h	Tue May 25 13:16:14 2010 +0300
@@ -26,6 +26,7 @@
 #include "alf/alfelement.h"
 #include <alf/alfimagevisual.h>
 #include <alf/alflayout.h>
+#include <alf/alftexture.h>
 #include <mul/imulsliderwidget.h>
 
 #include <alf/ialfwidgeteventhandler.h>
@@ -53,7 +54,6 @@
 class CAlfWidgetControl;
 class MulSliderLongTapTimer;
 
-
 /**
  * Default Base Element of the Scrollbar.
  */
@@ -355,6 +355,12 @@
     */
     AlfEventStatus trackVisualHit(CAlfVisual * aHitVisual);
     
+    /**
+     * Texture for Visuals of slider. 
+     * 
+     */
+    TAlfImage skinTexture(TSize aPrtImageSize, TSize aLscImageSize, TInt aPrtSkinId, TInt aLscSkinId );
+    
 private: // Class Data
     
 
--- a/mulwidgets/mulsliderwidget/src/mulslidercontrol.cpp	Tue May 11 16:42:11 2010 +0300
+++ b/mulwidgets/mulsliderwidget/src/mulslidercontrol.cpp	Tue May 25 13:16:14 2010 +0300
@@ -82,10 +82,11 @@
 //
 void MulSliderControl::VisualLayoutUpdated(CAlfVisual& aVisual)
     {
-    if((mLayoutWidth == -1 && roundFloatToInt(
-        aVisual.Size().ValueNow().iX) == 0) ||
-        (mLayoutHeight == -1 && roundFloatToInt(
-            aVisual.Size().ValueNow().iY) == 0))
+    
+    TPoint visualSize = aVisual.Size().IntValueNow();
+    
+    if((mLayoutWidth == -1 && visualSize.iX) == 0 || 
+        (mLayoutHeight == -1 && visualSize.iY) == 0)           
         {
         //return; /*No size assigned yet*/
         }
@@ -94,8 +95,8 @@
         //do nothing
         }   
 
-    if(mLayoutWidth == roundFloatToInt(aVisual.Size().ValueNow().iX)  && 
-        mLayoutHeight == roundFloatToInt(aVisual.Size().ValueNow().iY))
+    if(mLayoutWidth == visualSize.iX  && 
+        mLayoutHeight == visualSize.iY) 
         {
         //return; /* No change in layout size */
         }
@@ -104,8 +105,8 @@
         //do nothing
         }
 
-    mLayoutWidth = roundFloatToInt(aVisual.Size().ValueNow().iX);
-    mLayoutHeight = roundFloatToInt(aVisual.Size().ValueNow().iY);
+    mLayoutWidth = visualSize.iX; 
+    mLayoutHeight = visualSize.iY;
     IAlfElement* baseelement = findElement ("BaseElement");
     IMulSliderBaseElementInternal* elementInternal = 
         static_cast<IMulSliderBaseElementInternal*> (
--- a/mulwidgets/mulsliderwidget/src/mulsliderutils.cpp	Tue May 11 16:42:11 2010 +0300
+++ b/mulwidgets/mulsliderwidget/src/mulsliderutils.cpp	Tue May 25 13:16:14 2010 +0300
@@ -40,11 +40,12 @@
 	     SliderLCTIDs aId,CAlfLayout *aLayout,int aVariety)
 	 {
 	 	TAknLayoutRect layoutRect;
-    
-		TRect rect2(0,
-		           0,
-		           aLayout->Size().iX.ValueNow(),
-		           aLayout->Size().iY.ValueNow());
+	 	TPoint layoutRectSize = aLayout->Size().IntValueNow();
+	 	    
+	 	TRect rect2(0,
+	 	           0,
+	 	           layoutRectSize.iX,
+	 	           layoutRectSize.iY);
 		switch(aId)
 		    {
 			case EVSliderPane:  
--- a/mulwidgets/mulsliderwidget/src/mulverticalslider.cpp	Tue May 11 16:42:11 2010 +0300
+++ b/mulwidgets/mulsliderwidget/src/mulverticalslider.cpp	Tue May 25 13:16:14 2010 +0300
@@ -26,7 +26,7 @@
 #include <alf/alfbrusharray.h>
 #include <alf/alftextvisual.h>
 #include <alf/alfevent.h>
-//#include <osn/alfptrvector.h>
+#include <alf/alftexture.h>
 #include <alf/alfframebrush.h>
 
 //Widget Model Includes
@@ -67,6 +67,18 @@
     CAlfVisual * mVisual;// Stores the current visual hit 
     TPoint mDragPoint;// Point at which drag started 
     TPoint mLongTapPos;// Point at which button down happened 
+    TSize mTrackTopImageSizePrt;
+    TSize mTrackTopImageSizeLsc;
+    TSize mTrackMiddleImageSizePrt;
+    TSize mTrackMiddleImageSizeLsc;
+    TSize mTrackBottomImageSizePrt;
+    TSize mTrackBottomImageSizeLsc;
+    TSize mSliderHandleSizePrt;
+    TSize mSliderHandleSizeLsc;
+    TSize mImagePlusSizePrt;
+    TSize mImagePlusSizeLsc;
+    TSize mImageMinusSizePrt;
+    TSize mImageMinusSizeLsc;
     int mDragStartStep;// Tick positon of Drag Start
     int mCurrTick;// Stores current tick
     int mTick;// Stores Tick Size
@@ -77,12 +89,19 @@
     int mdirection;// 0 - nomovement,1 up movement 2 down
     bool mLayoutMirrored;// RTL if True else LTR
     int mImageTextureId; // to differtiate between textures 
-    int mTrackTopTextureId ;// to store the auto generated texture id's
-    int mTrackBottomTextureId;
-    int mTrackMiddleTextureId;
-    int mMarkerTextureId;
-    int mZoomInTextureId;
-    int mZoomOutTextureId;
+    int mTrackTopTexturePrtId ;// to store the auto generated texture id's
+    int mTrackTopTextureLscId;
+    int mTrackBottomTexturePrtId;
+    int mTrackBottomTextureLscId;
+    int mTrackMiddleTextureLscId;
+    int mTrackMiddleTexturePrtId;
+    int mMarkerTextureLscId;
+    int mMarkerTexturePrtId;
+    int mZoomInTexturePrtId;
+    int mZoomInTextureLscId; 
+    int mZoomOutTexturePrtId;
+    int mZoomOutTextureLscId;
+    
     
     CAlfLayout* mMainLayout;
     CAlfLayout* mBaseSliderLayout;// Slider Background
@@ -114,12 +133,18 @@
         mTick = 0;
         mTrackStartPoint = 0;
         mImageTextureId = 0;
-        mTrackTopTextureId = 0;
-        mTrackBottomTextureId = 0;
-        mTrackMiddleTextureId = 0;
-        mMarkerTextureId = 0;
-        mZoomInTextureId = 0;
-        mZoomOutTextureId = 0;
+        mTrackTopTexturePrtId = 0;
+        mTrackTopTextureLscId = 0;
+        mTrackBottomTexturePrtId = 0;
+        mTrackBottomTextureLscId = 0;
+        mTrackMiddleTexturePrtId = 0;
+        mTrackMiddleTextureLscId = 0;
+        mMarkerTexturePrtId = 0;
+        mMarkerTextureLscId = 0;
+        mZoomInTexturePrtId = 0;
+        mZoomInTextureLscId = 0;
+        mZoomOutTexturePrtId = 0;
+        mZoomOutTextureLscId = 0;
         mMainLayout = NULL;
         mBaseSliderLayout = NULL;
         mSliderCentre = NULL;
@@ -137,6 +162,18 @@
         mdirection = 0;
         mLayoutMirrored = false;
         mHasBackground = false;
+        mTrackTopImageSizePrt.SetSize(0,0);
+        mTrackTopImageSizeLsc.SetSize(0,0);
+        mTrackBottomImageSizePrt.SetSize(0,0);
+        mTrackBottomImageSizeLsc.SetSize(0,0);
+        mTrackMiddleImageSizePrt.SetSize(0,0);
+        mTrackMiddleImageSizeLsc.SetSize(0,0);
+        mSliderHandleSizePrt.SetSize(0,0);
+        mSliderHandleSizeLsc.SetSize(0,0);
+        mImagePlusSizePrt.SetSize(0,0);
+        mImagePlusSizeLsc.SetSize(0,0);
+        mImageMinusSizePrt.SetSize(0,0);
+        mImageMinusSizeLsc.SetSize(0,0);
         } 
 
     };
@@ -183,13 +220,20 @@
     // Visualization Data
     if(mData)
         {
-        (&control().Env())->TextureManager().UnloadTexture(mData->mTrackTopTextureId);
-        (&control().Env())->TextureManager().UnloadTexture(mData->mTrackBottomTextureId);
-        (&control().Env())->TextureManager().UnloadTexture(mData->mTrackTopTextureId);
-        (&control().Env())->TextureManager().UnloadTexture(mData->mMarkerTextureId);
-        (&control().Env())->TextureManager().UnloadTexture(mData->mZoomInTextureId);
-        (&control().Env())->TextureManager().UnloadTexture(mData->mZoomOutTextureId);
-        delete mData;
+            CAlfTextureManager& txtmanager = control().Env().TextureManager();
+            txtmanager.UnloadTexture(mData->mTrackTopTextureLscId);
+            txtmanager.UnloadTexture(mData->mTrackTopTexturePrtId);
+            txtmanager.UnloadTexture(mData->mTrackMiddleTextureLscId);
+            txtmanager.UnloadTexture(mData->mTrackMiddleTexturePrtId);
+            txtmanager.UnloadTexture(mData->mTrackBottomTextureLscId);
+            txtmanager.UnloadTexture(mData->mTrackBottomTexturePrtId);
+            txtmanager.UnloadTexture(mData->mMarkerTexturePrtId);
+            txtmanager.UnloadTexture(mData->mMarkerTextureLscId);
+            txtmanager.UnloadTexture(mData->mZoomInTexturePrtId);
+            txtmanager.UnloadTexture(mData->mZoomInTextureLscId);
+            txtmanager.UnloadTexture(mData->mZoomOutTexturePrtId);
+            txtmanager.UnloadTexture(mData->mZoomOutTextureLscId);
+            delete mData;
         }
     else
         {
@@ -309,6 +353,7 @@
             TRect( TPoint(layoutRect.Rect().iTl.iX,layoutRect.Rect().iTl.iY  ),
                     TSize( layoutRect.Rect().Size().iWidth, 
                             layoutRect.Rect().Size().iHeight ))) ;
+        
    if(!mData->mHasBackground)
             SetBackgroundBrush();
     // Set Position and Size for Extended touch layout for track
@@ -318,26 +363,66 @@
                             layoutRect.Rect().Size().iHeight )));
 
 
-    //get the lct rect for mImageMinus and set it            
-    // aid_touch_size_slider_min(2) 
+    //get the lct rect for mSliderCentre and set it     
+    //aaslider_bg_pane_cp001(6)
     layoutRect = MulSliderUtils::GetComponentRect(
-            EVSliderMinus,mData->mBaseSliderLayout,KVariety2);
-    mData->mImageMinus->SetRect(
-            TRect( TPoint( layoutRect.Rect().iTl.iX,layoutRect.Rect().iTl.iY ),
+            EVSliderBgPane,
+            mData->mBaseSliderLayout,
+            KVariety6);
+    
+    mData->mSliderCentre->SetRect(
+            TRect( TPoint( layoutRect.Rect().iTl.iX ,
+                    layoutRect.Rect().iTl.iY),
                     TSize( layoutRect.Rect().Size().iWidth, 
-                            layoutRect.Rect().Size().iHeight ))) ;
+                            layoutRect.Rect().Size().iHeight )));
+
+    //get the lct rect for mTrackTopImage and set it     
+    //aaslider_bg_pane_cp001_g1(0)
+    layoutRect = MulSliderUtils::GetComponentRect(
+            EVSliderTop,
+            mData->mSliderCentre,
+            KVariety0);
+    
+    mData->mTrackTopImage->SetRect(
+            TRect( TPoint(0,layoutRect.Rect().iTl.iY),
+                    TSize( layoutRect.Rect().Size().iWidth, 
+                            layoutRect.Rect().Size().iHeight )));
+    
+    mSliderModel->IsLandscape() ? mData->mTrackTopImageSizeLsc = layoutRect.Rect().Size():    
+                                  mData->mTrackTopImageSizePrt = layoutRect.Rect().Size();    
 
-    //get the lct rect for mImagePlus and set it            
-    // aid_touch_size_slider_max(1) 
+    //get the lct rect for mTrackMiddleImage and set it     
+    //aaslider_bg_pane_cp001_g3(0)
+    layoutRect = MulSliderUtils::GetComponentRect(
+            EVSliderMiddle,
+            mData->mSliderCentre,
+            KVariety0);
+    mData->mTrackMiddleImage->SetRect(
+            TRect( TPoint( 0,layoutRect.Rect().iTl.iY),
+                    TSize( layoutRect.Rect().Size().iWidth, 
+                            layoutRect.Rect().Size().iHeight )));
+
+    mSliderModel->IsLandscape() ? mData->mTrackMiddleImageSizeLsc = layoutRect.Rect().Size():    
+                                  mData->mTrackMiddleImageSizePrt = layoutRect.Rect().Size();    
+    //get the lct rect for mTrackEndImage and set it     
+    //aaslider_bg_pane_cp001_g2(0)
     layoutRect = MulSliderUtils::GetComponentRect(
-            EVSliderPlus,
-            mData->mBaseSliderLayout,
-            KVariety1);
-    mData->mImagePlus->SetRect(
-            TRect( TPoint( layoutRect.Rect().iTl.iX,layoutRect.Rect().iTl.iY ),
+            EVSliderEnd,
+            mData->mSliderCentre,
+            KVariety0);
+    mData->mTrackEndImage->SetRect(
+            TRect( TPoint(0,layoutRect.Rect().iTl.iY),
                     TSize( layoutRect.Rect().Size().iWidth, 
-                            layoutRect.Rect().Size().iHeight ))) ;
+                            layoutRect.Rect().Size().iHeight )));
+    mSliderModel->IsLandscape() ? mData->mTrackBottomImageSizeLsc = layoutRect.Rect().Size():    
+                                  mData->mTrackBottomImageSizePrt = layoutRect.Rect().Size();
+  
+    if(mData->mTrackTopImage && mData->mTrackMiddleImage && mData->mTrackEndImage)
+       {
+        setTrackImage();
+       }
 
+    
     //get the lct rect for mSliderHandle and set it     
     //aid_touch_size_slider_marker(5)
     layoutRect = MulSliderUtils::GetComponentRect(
@@ -348,6 +433,8 @@
             TRect( TPoint( layoutRect.Rect().iTl.iX,layoutRect.Rect().iTl.iY ),
                     TSize( layoutRect.Rect().Size().iWidth, 
                             layoutRect.Rect().Size().iHeight ))) ;
+    mSliderModel->IsLandscape() ? mData->mSliderHandleSizeLsc = layoutRect.Rect().Size():    
+                                  mData->mSliderHandleSizePrt = layoutRect.Rect().Size();
     
     layoutRect = MulSliderUtils::GetComponentRect(
                 EVSliderMarkerExtended,
@@ -363,94 +450,51 @@
                     mData->mHandleGhostHieghtDelta/2),
                     TSize( mData->mBaseSliderLayout->Size().iX.ValueNow(), 
                             layoutRect.Rect().Size().iHeight)));
-
-    //get the lct rect for mSliderCentre and set it     
-    //aaslider_bg_pane_cp001(6)
-    layoutRect = MulSliderUtils::GetComponentRect(
-            EVSliderBgPane,
-            mData->mBaseSliderLayout,
-            KVariety6);
-    mData->mSliderCentre->SetRect(
-            TRect( TPoint( layoutRect.Rect().iTl.iX ,
-                    layoutRect.Rect().iTl.iY),
-                    TSize( layoutRect.Rect().Size().iWidth, 
-                            layoutRect.Rect().Size().iHeight )));
-
-    //get the lct rect for mTrackTopImage and set it     
-    //aaslider_bg_pane_cp001_g1(0)
-    layoutRect = MulSliderUtils::GetComponentRect(
-            EVSliderTop,
-            mData->mSliderCentre,
-            KVariety0);
-    mData->mTrackTopImage->SetRect(
-            TRect( TPoint(0,layoutRect.Rect().iTl.iY),
-                    TSize( layoutRect.Rect().Size().iWidth, 
-                            layoutRect.Rect().Size().iHeight )));
-
-    //get the lct rect for mTrackMiddleImage and set it     
-    //aaslider_bg_pane_cp001_g3(0)
-    layoutRect = MulSliderUtils::GetComponentRect(
-            EVSliderMiddle,
-            mData->mSliderCentre,
-            KVariety0);
-    mData->mTrackMiddleImage->SetRect(
-            TRect( TPoint( 0,layoutRect.Rect().iTl.iY),
-                    TSize( layoutRect.Rect().Size().iWidth, 
-                            layoutRect.Rect().Size().iHeight )));
-
-    //get the lct rect for mTrackEndImage and set it     
-    //aaslider_bg_pane_cp001_g2(0)
-    layoutRect = MulSliderUtils::GetComponentRect(
-            EVSliderEnd,
-            mData->mSliderCentre,
-            KVariety0);
-    mData->mTrackEndImage->SetRect(
-            TRect( TPoint(0,layoutRect.Rect().iTl.iY),
-                    TSize( layoutRect.Rect().Size().iWidth, 
-                            layoutRect.Rect().Size().iHeight )));
-  
-    if(mData->mTrackTopImage && 
-                    mData->mTrackMiddleImage && 
-                    mData->mTrackEndImage)
-                {
-                setTrackImage();
-                }
+    
     if(mData->mSliderHandle)
         {
         mData->mImageTextureId = KAlfMarkerTextureId;
         // Create the texture from bitmap provider
-        mData->mTexture = &((ctrl->Env()).TextureManager().CreateTextureL(
-                KAlfAutoGeneratedTextureId/*KAlfMarkerTextureId*/,
-                (MAlfBitmapProvider *)this,
-                (TAlfTextureFlags)(EAlfTextureFlagRetainResolution|
-                                   EAlfTextureFlagSkinContent)));
-        TAlfImage aImage(*mData->mTexture );                                                
-        mData->mSliderHandle->SetImage(aImage);
-
+        mData->mSliderHandle->SetImage( skinTexture(mData->mSliderHandleSizePrt ,mData->mSliderHandleSizeLsc , mData->mMarkerTexturePrtId, mData->mMarkerTextureLscId ) );
         }
 
+    //get the lct rect for mImagePlus and set it            
+    // aid_touch_size_slider_max(1) 
+    layoutRect = MulSliderUtils::GetComponentRect(
+            EVSliderPlus,
+            mData->mBaseSliderLayout,
+            KVariety1);
+    mData->mImagePlus->SetRect(
+            TRect( TPoint( layoutRect.Rect().iTl.iX,layoutRect.Rect().iTl.iY ),
+                    TSize( layoutRect.Rect().Size().iWidth, 
+                            layoutRect.Rect().Size().iHeight ))) ;
+    
+    mSliderModel->IsLandscape() ? mData->mImagePlusSizeLsc = layoutRect.Rect().Size():    
+                                  mData->mImagePlusSizePrt = layoutRect.Rect().Size();
     if(mData->mImagePlus)
         {
         mData->mImageTextureId = KAlfZoomInTextureId;
         // Create the texture from bitmap provider
-        mData->mTexture = &((ctrl->Env()).TextureManager().CreateTextureL(
-                KAlfAutoGeneratedTextureId/*KAlfZoomInTextureId*/,
-                (MAlfBitmapProvider *)this,
-                (TAlfTextureFlags)(EAlfTextureFlagRetainResolution|EAlfTextureFlagSkinContent)));
-        TAlfImage aImage(*mData->mTexture );
-        mData->mImagePlus->SetImage(aImage);
+        mData->mImagePlus->SetImage(skinTexture(mData->mImagePlusSizePrt ,mData->mImagePlusSizeLsc , mData->mZoomInTexturePrtId, mData->mZoomInTextureLscId ));
         }
 
+    //get the lct rect for mImageMinus and set it            
+    // aid_touch_size_slider_min(2) 
+    layoutRect = MulSliderUtils::GetComponentRect(
+            EVSliderMinus,mData->mBaseSliderLayout,KVariety2);
+    
+    mData->mImageMinus->SetRect(
+            TRect( TPoint( layoutRect.Rect().iTl.iX,layoutRect.Rect().iTl.iY ),
+                    TSize( layoutRect.Rect().Size().iWidth, 
+                            layoutRect.Rect().Size().iHeight ))) ;
+
+    mSliderModel->IsLandscape() ? mData->mImageMinusSizeLsc = layoutRect.Rect().Size():    
+                                  mData->mImageMinusSizePrt = layoutRect.Rect().Size();
     if(mData->mImageMinus)
         {
         mData->mImageTextureId = KAlfZoomOutTextureId;
         // Create the texture from bitmap provider
-        mData->mTexture = &((ctrl->Env()).TextureManager().CreateTextureL(
-                KAlfAutoGeneratedTextureId/*KAlfZoomOutTextureId*/,
-                (MAlfBitmapProvider *)this,
-                (TAlfTextureFlags)(EAlfTextureFlagRetainResolution|EAlfTextureFlagSkinContent)));
-        TAlfImage aImage(*mData->mTexture );
-        mData->mImageMinus->SetImage(aImage);
+        mData->mImageMinus->SetImage(skinTexture(mData->mImageMinusSizePrt ,mData->mImageMinusSizeLsc , mData->mZoomOutTexturePrtId, mData->mZoomOutTextureLscId ));
 
         }
     }
@@ -462,41 +506,19 @@
 
 void MulSliderVertical::setTrackImage()
     {
-    //Review
-    TInt flags = EAlfTextureFlagSkinContent;
-    flags |= EAlfTextureFlagAutoSize;
 
-    CAlfControl* ctrl = (CAlfControl*)&control();
-    //creating texture for topimage
-    mData->mImageTextureId = KAlfTrackTopTextureId;
-    mData->mTexture = &((ctrl->Env()).TextureManager().CreateTextureL(
-        KAlfAutoGeneratedTextureId/*KAlfTrackTopTextureId*/,
-        (MAlfBitmapProvider *)this,
-        (TAlfTextureFlags)(EAlfTextureFlagRetainResolution|EAlfTextureFlagSkinContent)));
-
-    TAlfImage trackTopImage(*mData->mTexture );
-    //creating texture for middleimage
-    mData->mImageTextureId = KAlfTrackMiddleTextureId;
-    mData->mTexture = &((ctrl->Env()).TextureManager().CreateTextureL(
-        KAlfAutoGeneratedTextureId/*KAlfTrackMiddleTextureId*/,
-        (MAlfBitmapProvider *)this,
-        (TAlfTextureFlags)(EAlfTextureFlagRetainResolution|EAlfTextureFlagSkinContent)));
-
-    TAlfImage trackMiddleImage(*mData->mTexture );
-
-    //creating texture for bottom image
-    mData->mImageTextureId = KAlfTrackBottomTextureId;
-    mData->mTexture = &((ctrl->Env()).TextureManager().CreateTextureL(
-        KAlfAutoGeneratedTextureId/*KAlfTrackBottomTextureId*/,
-        (MAlfBitmapProvider *)this,
-        (TAlfTextureFlags)(EAlfTextureFlagDefault)));
-
-
-    TAlfImage trackEndImage(*mData->mTexture );
-    // Set Image on visuals
-    mData->mTrackTopImage->SetImage(trackTopImage);
-    mData->mTrackMiddleImage->SetImage(trackMiddleImage);                    
-    mData->mTrackEndImage->SetImage(trackEndImage);
+        CAlfControl* ctrl = (CAlfControl*)&control();
+        //creating texture for topimage
+        mData->mImageTextureId = KAlfTrackTopTextureId;
+        mData->mTrackTopImage->SetImage( skinTexture(mData->mTrackTopImageSizePrt ,mData->mTrackTopImageSizeLsc , mData->mTrackTopTexturePrtId, mData->mTrackTopTextureLscId ) ) ;
+        
+        //creating texture for middleimage
+        mData->mImageTextureId = KAlfTrackMiddleTextureId;
+        mData->mTrackMiddleImage->SetImage(skinTexture(mData->mTrackMiddleImageSizePrt ,mData->mTrackMiddleImageSizeLsc , mData->mTrackMiddleTexturePrtId, mData->mTrackMiddleTextureLscId ));
+        
+        //creating texture for bottom image
+        mData->mImageTextureId = KAlfTrackBottomTextureId;
+        mData->mTrackEndImage->SetImage( skinTexture(mData->mTrackBottomImageSizePrt ,mData->mTrackBottomImageSizeLsc , mData->mTrackBottomTexturePrtId, mData->mTrackBottomTextureLscId ) );
 
     }//End of setImage
  
@@ -528,7 +550,8 @@
                                 layoutRect.Rect().Size().iHeight),
                                 EAspectRatioNotPreserved);
             mData->mImageTextureId = 0;
-            mData->mTrackTopTextureId = aId;
+            mSliderModel->IsLandscape() ? mData->mTrackTopTextureLscId = aId :
+                                          mData->mTrackTopTexturePrtId = aId ;
             }
             break;
         case KAlfTrackBottomTextureId:
@@ -549,7 +572,8 @@
                                     layoutRect.Rect().Size().iHeight),
                                     EAspectRatioNotPreserved);
             mData->mImageTextureId = 0;
-            mData->mTrackBottomTextureId = aId;
+            mSliderModel->IsLandscape() ?   mData->mTrackBottomTextureLscId = aId :
+                                            mData->mTrackBottomTexturePrtId = aId ;     
             }
             break;
         case KAlfTrackMiddleTextureId:
@@ -572,7 +596,8 @@
                                    EAspectRatioNotPreserved);
 
             mData->mImageTextureId = 0;
-            mData->mTrackMiddleTextureId = aId;
+            mSliderModel->IsLandscape() ? mData->mTrackMiddleTextureLscId = aId :
+                                          mData->mTrackMiddleTexturePrtId = aId ;
             }
             break;
 
@@ -596,7 +621,8 @@
                                      EAspectRatioNotPreserved);
 
             mData->mImageTextureId = 0;
-            mData->mMarkerTextureId = aId;
+            mSliderModel->IsLandscape() ? mData->mMarkerTextureLscId = aId :
+                                          mData->mMarkerTexturePrtId = aId ;
             }
             break;
         case KAlfZoomInTextureId:
@@ -616,7 +642,8 @@
                                   layoutRect.Rect().Size().iHeight),
                                   EAspectRatioNotPreserved);
             mData->mImageTextureId = 0;
-            mData->mZoomInTextureId = aId;
+            mSliderModel->IsLandscape() ? mData->mZoomInTextureLscId = aId :
+                                          mData->mZoomInTexturePrtId = aId;
             }
             break;
          case KAlfZoomOutTextureId:
@@ -637,9 +664,11 @@
                                      EAspectRatioNotPreserved);
 
            mData->mImageTextureId = 0;
-           mData->mZoomOutTextureId = aId;
+           mSliderModel->IsLandscape() ? mData->mZoomOutTextureLscId = aId :
+                                         mData->mZoomOutTexturePrtId = aId ;
+           
            }
-             break;
+           break;
         default:
             break;
                
@@ -691,6 +720,41 @@
     mData->mHasBackground = true;
     }    
     
+// ----------------------------------------------------------------------------
+//  skinTexture()
+// ----------------------------------------------------------------------------
+//
+TAlfImage MulSliderVertical::skinTexture(TSize aPrtImageSize, TSize aLscImageSize, TInt aPrtSkinId, TInt aLscSkinId )
+    {
+        const CAlfControl* ctrl = (CAlfControl*)(&control());
+        
+        if ( aPrtImageSize != aLscImageSize )
+            {
+            if ( aPrtSkinId == 0 || aLscSkinId == 0 )
+                {
+                mData->mTexture = &((ctrl->Env()).TextureManager().CreateTextureL(
+                                    KAlfAutoGeneratedTextureId,
+                                    (MAlfBitmapProvider *)this,
+                                    (TAlfTextureFlags)(EAlfTextureFlagRetainResolution|EAlfTextureFlagSkinContent)));
+                TAlfImage dummyImage(*mData->mTexture);
+                return dummyImage;
+                }
+            }
+        else if ( aPrtSkinId == 0 || aLscSkinId == 0 )
+                {
+                TInt id = aPrtSkinId > aLscSkinId ? aPrtSkinId : aLscSkinId;
+                mData->mTexture = ((ctrl->Env()).TextureManager().TextureL(id));
+                TAlfImage dummyImage(*mData->mTexture);
+                return dummyImage;
+                }
+        
+        TInt textureId = mSliderModel->IsLandscape() ? aLscSkinId : aPrtSkinId;
+        mData->mTexture = ((ctrl->Env()).TextureManager().TextureL( textureId ));
+        TAlfImage dummyImage(*mData->mTexture);
+        return dummyImage;
+    }
+
+
 // ---------------------------------------------------------------------------
 //  MakeTransparent()
 // ---------------------------------------------------------------------------
@@ -715,28 +779,30 @@
 //
 void MulSliderVertical::ConvertDataToPixels()
     {
+    float sliderCentreSize = mData->mSliderCentre->Size().iY.ValueNow();
+    float sliderHandleSize = mData->mSliderHandle->Size().iY.ValueNow();
+    float sliderCentrePos  = mData->mSliderCentre->Pos().iY.ValueNow();
+    
     // Calculate the range in pixel values
-    mData->mRangeInPixels = 
-    (mData->mSliderCentre->Size().iY.ValueNow() - 
-            mData->mSliderHandle->Size().iY.ValueNow());
+    mData->mRangeInPixels = sliderCentreSize - sliderHandleSize;
 
     if(mSliderModel->MaxRange() - mSliderModel->MinRange() != 0)
         {
         // Calculate Tick Size in Pixels
         mData->mTickInPixels = 
-        (mData->mSliderCentre->Size().iY.ValueNow() - 
-                mData->mSliderHandle->Size().iY.ValueNow()) /
-                (mSliderModel->MaxRange() - mSliderModel->MinRange()) ;
+        (sliderCentreSize - sliderHandleSize) /
+            (mSliderModel->MaxRange() - mSliderModel->MinRange()) ;
         }
     // Get the track start pixel value    
-    mData->mTrackStartPoint = mData->mSliderCentre->Pos().iY.ValueNow() +
-    mData->mSliderCentre->Size().iY.ValueNow() -   
-    mData->mSliderHandle->Size().iY.ValueNow()  ;  
+    mData->mTrackStartPoint = 
+    sliderCentrePos + 
+    sliderCentreSize -   
+    sliderHandleSize  ;  
     // Store current tick
     mData->mCurrTick =  mSliderModel->PrimaryValue() ; 
     if(mSliderModel->MaxRange()== mSliderModel->MinRange())
         {
-        mData->mTrackStartPoint= mData->mSliderCentre->Pos().iY.ValueNow();
+        mData->mTrackStartPoint= sliderCentrePos;
         }
     mData->mTick = mSliderModel->Tick();
     }