yishayw opened a new issue #796: Loaded Image for Button is Too Padded URL: https://github.com/apache/royale-asjs/issues/796 `<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.apache.org/royale/mx" applicationComplete="init()" width="600" height="400"> <fx:Script> <![CDATA[ import mx.containers.HBox; import mx.controls.Button; private function init():void { var buttonContainer:HBox = new HBox(); this.addChild(buttonContainer); var minimizeButton:Button = new Button(); minimizeButton.width = minimizeButton.height = 16; minimizeButton.icon = "icon_close_up.png" buttonContainer.addChild(minimizeButton); var maximizeButton:Button = new Button(); maximizeButton.width = maximizeButton.height = 16; maximizeButton.icon = "icon_close_up.png"; buttonContainer.addChild(maximizeButton); } ]]> </fx:Script> </mx:Application>` Above application has an overflow on the HBox after the icons are loaded. This seems to be caused by these lines in Button.as ``` var img:HTMLImageElement = event.target as HTMLImageElement; element.style["padding-left"] = String(img.naturalWidth+4)+"px"; ``` I'm not sure what the purpose of this was (added by @pentapache ).
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
