| <?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:fb="http://ns.adobe.com/flashbuilder/2009" |
| minWidth="21" minHeight="21" |
| alpha.disabled="0.5"> |
| |
| <fx:Metadata> |
| <![CDATA[ |
| /** |
| * @copy spark.skins.spark.ApplicationSkin#hostComponent |
| */ |
| [HostComponent("spark.components.Button")] |
| ]]> |
| </fx:Metadata> |
| |
| <fx:Script fb:purpose="styling"> |
| <![CDATA[ |
| |
| /** |
| * @private |
| */ |
| override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void |
| { |
| fillColor.color = getStyle( "chromeColor"); |
| |
| var cr:Number = getStyle("cornerRadius"); |
| |
| if (cornerRadius != cr) |
| { |
| cornerRadius = cr; |
| border.radiusX = border.radiusY = cornerRadius; |
| fill.radiusX = fill.radiusY = cornerRadius - 1; |
| // |
| // lowlight.radiusX = cornerRadius; |
| // highlight.radiusX = cornerRadius; |
| // border.radiusX = cornerRadius; |
| } |
| if( highlight ) highlight.radiusX = highlight.radiusY = cornerRadius - 1; |
| if( downHighlight ) downHighlight.radiusX = downHighlight.radiusY = cornerRadius - 1; |
| // if( downHighlight ) downHighlight.radiusX = downHighlight.radiusY = cornerRadius - 1; |
| |
| // if (highlightStroke) highlightStroke.radiusX = cornerRadius; |
| // if (hldownstroke1) hldownstroke1.radiusX = cornerRadius; |
| // if (hldownstroke2) hldownstroke2.radiusX = cornerRadius; |
| |
| super.updateDisplayList(unscaledWidth, unscaledHeight); |
| } |
| |
| private var cornerRadius:Number = 2; |
| |
| ]]> |
| </fx:Script> |
| |
| <!-- states --> |
| <s:states> |
| <s:State name="up" /> |
| <s:State name="over" /> |
| <s:State name="down" /> |
| <s:State name="disabled" /> |
| </s:states> |
| |
| <s:filters> |
| <s:DropShadowFilter blurX="3" blurY="3" strength="1" angle="90" distance="1" |
| color="0x000000" alpha="0.34"/> |
| <s:DropShadowFilter blurX="0" blurY="0" strength="0.5" angle="137" distance="1" |
| color="0x000000" alpha="0.14" inner="true"/> |
| </s:filters> |
| |
| |
| <!-- border --> |
| <!--- @private --> |
| <s:Rect id="border" left="0" right="0" top="0" bottom="0" |
| radiusX="3" radiusY="3"> |
| <s:fill> |
| <s:SolidColor color.over="0xFFFFFF" color.down="0xFFFFFF" |
| color="{getStyle( 'borderColor' )}"/> |
| </s:fill> |
| </s:Rect> |
| |
| <!-- fill --> |
| <!--- @private --> |
| <s:Rect id="fill" left="1" right="1" top="1" bottom="1" |
| radiusX="2" radiusY="2"> |
| <s:fill> |
| <s:SolidColor id="fillColor"/> |
| </s:fill> |
| </s:Rect> |
| |
| <!-- highlight --> |
| <!--- @private --> |
| <s:Rect id="highlight" left="1" right="1" top="1" bottom="1" |
| radiusX="2" radiusY="2" excludeFrom="down"> |
| <s:fill> |
| <s:LinearGradient rotation="90"> |
| <s:GradientEntry color="0xFFFFFF" alpha="0.4" /> |
| <s:GradientEntry color="0xFFFFFF" alpha="0" /> |
| </s:LinearGradient> |
| </s:fill> |
| </s:Rect> |
| |
| <!-- downs highlight --> |
| <!--- @private --> |
| <s:Rect id="downHighlight" left="1" right="1" top="1" bottom="1" |
| radiusX="2" radiusY="2" includeIn="down"> |
| <s:fill> |
| <s:LinearGradient rotation="90"> |
| <s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.15" /> |
| <s:GradientEntry color="0xFFFFFF" alpha="0.4" /> |
| </s:LinearGradient> |
| </s:fill> |
| </s:Rect> |
| |
| <!-- layer 8: text --> |
| <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay --> |
| <s:Label id="labelDisplay" |
| textAlign="center" |
| maxDisplayedLines="1" |
| horizontalCenter="0" verticalCenter="1" verticalAlign="middle" |
| left="10" right="10" top="2" bottom="2"> |
| </s:Label> |
| |
| </s:Skin> |