blob: b1acb05fd9457412850383cc7fbf4f851075f2b4 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:local="*" xmlns:controls="ws.tink.spark.controls.*">
<!-- host component -->
<fx:Metadata>
[HostComponent("ws.tink.spark.controls.ProgressBar")]
</fx:Metadata>
<fx:Script>
<![CDATA[
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
barColor.color = getStyle( "chromeColor" );
border.radiusX = border.radiusY = unscaledHeight / 2;
fill.radiusX = fill.radiusY = ( unscaledHeight - 2 ) / 2;
barFill.radiusX = barFill.radiusY = ( unscaledHeight - 4 ) / 2;
barHighlight.radiusX = barHighlight.radiusY = ( unscaledHeight - 4 ) / 2;
bar.minWidth = unscaledHeight-4;
super.updateDisplayList( unscaledWidth, unscaledHeight );
}
]]>
</fx:Script>
<!-- SkinParts
name=percentLayout, type=PercentLayout, required=true
-->
<s:layout>
<controls:PercentLayout id="percentLayout" resizeItems="{[bar]}"/>
</s:layout>
<s:Group width="100%" height="100%">
<s:filters>
<s:DropShadowFilter blurX="4" blurY="4" inner="true" distance="1" angle="124" color="0x7b7b7b" alpha="0.4"/>
</s:filters>
<!-- border -->
<!--- @private -->
<s:Rect id="border" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0xBFBFBF"/>
<s:GradientEntry color="0xFFFFFF"/>
</s:LinearGradient>
</s:fill>
</s:Rect>
<!-- fill -->
<!--- @private -->
<s:Rect id="fill" left="1" right="1" top="1" bottom="1">
<s:fill>
<s:SolidColor color="0xFFFFFF"/>
</s:fill>
</s:Rect>
</s:Group>
<s:Group id="bar" left="2" right="2" top="2" bottom="2">
<s:filters>
<s:DropShadowFilter blurX="0" blurY="0" inner="true" distance="1" angle="90" color="0xffffff" alpha="0.2"/>
</s:filters>
<s:Rect id="barFill" width="100%" height="100%">
<s:fill>
<s:SolidColor id="barColor"/>
</s:fill>
</s:Rect>
<s:Rect id="barHighlight" width="100%" height="100%">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry alpha="0.5" color="0xFFFFFF"/>
<s:GradientEntry alpha="0" color="0xFFFFFF"/>
</s:LinearGradient>
</s:fill>
</s:Rect>
</s:Group>
</s:Skin>