Skip to content

Instantly share code, notes, and snippets.

@bclinkinbeard
Created August 23, 2011 04:04
Show Gist options
  • Save bclinkinbeard/1164319 to your computer and use it in GitHub Desktop.
Save bclinkinbeard/1164319 to your computer and use it in GitHub Desktop.
<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008"
scaleGridLeft="0" scaleGridTop="0" scaleGridRight="0" scaleGridBottom="0">
<Rect x="0" y="0" width="1" height="1">
<fill>
<SolidColor color="#FFFFFF" alpha="0" />
</fill>
</Rect>
</Graphic>
package meridiantablet.skins
{
import flash.display.GradientType;
import flash.display.Graphics;
import flash.geom.Matrix;
import spark.skins.mobile.ActionBarSkin;
public class SplitViewActionBarSkin extends ActionBarSkin
{
public function SplitViewActionBarSkin()
{
super();
borderClass = NoBorder;
}
override protected function drawBackground( unscaledWidth:Number, unscaledHeight:Number ):void
{
var g:Graphics = graphics;
g.clear();
g.beginFill( 0x000000, 1 );
g.drawRect( 0, 0, unscaledWidth, unscaledHeight );
g.endFill();
var m:Matrix = new Matrix();
m.createGradientBox( unscaledWidth, unscaledHeight, Math.PI / 2 );
g.beginGradientFill( GradientType.LINEAR, [ 0xFEFEFE, 0xDADDE2, 0xA6AAB7 ], [ 1, 1, 1 ], [ 0, 127, 240 ], m );
g.drawRoundRectComplex( 0, 0, 320, unscaledHeight, 5, 5, 0, 0 );
g.endFill();
g.beginGradientFill( GradientType.LINEAR, [ 0xFEFEFE, 0xDADDE2, 0xA6AAB7 ], [ 1, 1, 1 ], [ 0, 127, 240 ], m );
g.drawRoundRectComplex( 321, 0, unscaledWidth - 321, unscaledHeight, 5, 5, 0, 0 );
g.endFill();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment