             textDescent = metrics.descent;
         }
 
-        var textAlign:String = "center"; // getStyle("textAlign");
-        // Map new Spark values that might be set in a selector
-        // affecting both Halo and Spark components.
-        /*if (textAlign == "start")
-        textAlign = TextFormatAlign.LEFT;
-        else if (textAlign == "end")
-        textAlign = TextFormatAlign.RIGHT;*/
-
         var viewWidth:Number = unscaledWidth;
         var viewHeight:Number = unscaledHeight;
 

            }

            labelX = layoutPaddingLeft;

            if (textAlign == "left")
            {
                iconX += layoutPaddingLeft;
            }
            else if (textAlign == "right")
            {
                iconX += Math.max(viewWidth - iconWidth - layoutPaddingRight, layoutPaddingLeft);
            }
            else
            {
                iconX += ((viewWidth - iconWidth - layoutPaddingLeft - layoutPaddingRight) / 2) + layoutPaddingLeft;
            }

            if (iconPlacement == IconPlacement.BOTTOM)
            {


            // button viewHeight may be smaller than the labelDisplay textHeight
            labelHeight = Math.min(viewHeight, textHeight);
            labelX += ((viewWidth - labelWidth - iconWidth -
                horizontalGap - layoutPaddingLeft - layoutPaddingRight) / 2) + layoutPaddingLeft;

            if (iconPlacement == IconPlacement.LEFT)
            {
