Reputation: 1257
Use Flex 4.5.1 and when add icons to the button is so curve effect of scaling. Prompt how to make a proportional scaling icons?
<s:Button width="100%" height="50" label="Create new map" click="button3_clickHandler(event)"
fontSize="22" icon="@Embed('icons/001-folder.png')">
Upvotes: 0
Views: 2348
Reputation: 573
try to create custom skin for button and do the same in commitProperties
override protected function commitProperties():void
{
super.commitProperties();
if(iconDisplay){
iconDisplay.scaleMode = BitmapScaleMode.LETTERBOX;
}
}
Upvotes: 1
Reputation: 573
try add creation complete handler and set btn.iconDisplay.scaleMode to BitmapScaleMode.LETTERBOX
protected function creationCompleteHandler(event:FlexEvent):void
{
btn.iconDisplay.scaleMode = BitmapScaleMode.LETTERBOX
}
<s:Button id="btn" creationComplete="creationCompleteHandler(event)" width="100%" height="50" label="Create new map" click="button3_clickHandler(event)"
fontSize="22" icon="@Embed('icons/001-folder.png')">
Upvotes: 0