Hey,
The mx.core.Application
differs in a few ways from the new spark.components.Application
. It seems that the mx.core.Application
has an inheritedStyle for the paddings of 24. A quick mx.utils.ObjectUtil.toString()
of the Application's inheritingStyles
shows that. Spark Applications have no padding.
If you set the padding(left|right|top|bottom) to 0, the first part is solved.
The PanelSkin also has a DropShadow applied to it. This is not included in the padding calculations, so if you just copy-paste the PanelSkin and remove the drop shadow part, that'll be fixed.
Here's the code for the app...
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
creationComplete="{create()}">
<fx:Script>
<![CDATA[
import mx.utils.ObjectUtil;
public function create():void
{
var styles:Object = this.inheritingStyles;
trace(ObjectUtil.toString(styles));
}
]]>
</fx:Script>
<mx:Panel width="100%" height="100%" includeInLayout="true">
<mx:Label text="test"/>
</mx:Panel>
</mx:Application>
Hope that helps. Good luck.