     {
         super.layoutContents(unscaledWidth, unscaledHeight);
         
-        // calculate skin dimensions
-        var calculatedSkinWidth:Number = Math.max(unscaledWidth, getElementPreferredWidth(thumb));
-        var calculatedSkinHeight:Number = Math.max(unscaledHeight, getElementPreferredHeight(thumb));
-        
-        layoutSlidingContent(calculatedSkinWidth, calculatedSkinHeight);
-        layoutTrack(calculatedSkinWidth, calculatedSkinHeight);
-        layoutThumb(calculatedSkinWidth, calculatedSkinHeight);
-        layoutMask(calculatedSkinWidth, calculatedSkinHeight);
+        // calculate skin dimensions - outer stroke
+        var calculatedContentWidth:Number = Math.max(unscaledWidth - 2 * layoutOuterStrokeWeight, 
+            getElementPreferredWidth(thumb));
+        var calculatedContentHeight:Number = Math.max(unscaledHeight - 2 * layoutOuterStrokeWeight, 
+            getElementPreferredHeight(thumb));
+
+		setElementSize(contents, calculatedContentWidth, layoutThumbHeight);
+		setElementPosition(contents, layoutOuterStrokeWeight, 
+            layoutOuterStrokeWeight + (calculatedContentHeight - layoutThumbHeight) / 2);
+        
+        layoutTrack(calculatedContentWidth, layoutThumbHeight);
+        // Sliding content must be positioned after the track has been sized
+        layoutSlidingContent(calculatedContentWidth, layoutThumbHeight);
+        layoutThumb(calculatedContentWidth, layoutThumbHeight);
+        layoutMask(calculatedContentWidth, layoutThumbHeight);
     }
     
     /**

            layoutThumbWidth - layoutStrokeWeight * 3, layoutThumbHeight - layoutStrokeWeight * 3, 
            layoutCornerRadius * 2 - layoutStrokeWeight * 3);
        graphics.lineStyle();
    }
    
    /**

import mx.core.DPIClassification;
import mx.core.IVisualElement;
import mx.core.mx_internal;
import mx.utils.ColorUtil;

import spark.components.ToggleSwitch;
import spark.components.supportClasses.StyleableTextField;
import spark.core.SpriteVisualElement;
import spark.skins.mobile.supportClasses.MobileSkin;
import spark.skins.mobile160.assets.ToggleSwitch_contentShadow;
import spark.skins.mobile240.assets.ToggleSwitch_contentShadow;
