/* Define the skin elements that should not be colorized.
For toggle button, the graphics are colorized but the label is not. */
static private const exclusions:Array = ["labelDisplay"];
/**
* @copy spark.skins.SparkSkin#colorizeExclusions
*/
override public function get colorizeExclusions():Array {return exclusions;}
/**
* @private
*/
override protected function initializationComplete():void
{
useChromeColor = true;
super.initializationComplete();
}
/**
* @inheritDoc
*/
override protected function updateDisplayList(unscaledWidth:Number, unscaleHeight:Number):void
{
var cr:Number = getStyle("cornerRadius");
if (cornerRadius != cr)
{
cornerRadius = cr;
shadow.topRightRadiusX = cornerRadius;
shadow.bottomRightRadiusX = cornerRadius;
fill.topRightRadiusX = cornerRadius;
fill.bottomRightRadiusX = cornerRadius;
lowlight.radiusX = cornerRadius;
highlight.radiusX = cornerRadius;
highlightStroke.topRightRadiusX = cornerRadius;
highlightStroke.bottomRightRadiusX = cornerRadius;
border.topRightRadiusX = cornerRadius;
border.bottomRightRadiusX = cornerRadius;
}
var image:Class = Class((this as Object).hostComponent.data.icon);
var label:String = (this as Object).hostComponent.data.label;
labelDisplay.text = label;
//icon.source = image;
this.width = this.hostComponent.width;
this.minWidth = this.hostComponent.width;
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
private var cornerRadius:Number = 2;
import mx.core.INavigatorContent;