欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

flex渐变色制作圆角橙色按钮示例代码

程序员文章站 2022-06-19 13:16:03
复制代码 代码如下:
复制代码 代码如下:

<?xml version="1.0" encoding="utf-8"?>

<s:sparkbuttonskin 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="42" minheight="30"
alpha.disabled="0.5">

<fx:metadata>
<![cdata[
/**
* @copy spark.skins.spark.applicationskin#hostcomponent
*/
[hostcomponent("spark.components.button")]
]]>
</fx:metadata>

<!-- states -->
<s:states>
<s:state name="up" />
<s:state name="over" />
<s:state name="down" />
<s:state name="disabled" />
</s:states>

<s:rect left="0" right="0" top="0" bottom="0" topleftradiusx="7" toprightradiusx="7"
bottomleftradiusx="7" bottomrightradiusx="7">
<s:stroke>
<s:solidcolorstroke color.up="0xfaa51a"/>
</s:stroke>
<s:fill>
<s:lineargradient rotation="0">
<s:entries>
<s:gradiententry color="0xfaa51a"/>
<s:gradiententry color="0xf47a20" ratio=".5"/>
</s:entries>
</s:lineargradient>
<!--<s:radialgradient rotation="0">
<s:entries>
<s:gradiententry color="0xf0ffff" ratio=".7"/>
<s:gradiententry color="0xff83fa"/>
</s:entries>
</s:radialgradient>-->
</s:fill>
</s:rect>
<!-- layer 8: text -->
<!--- @copy spark.components.supportclasses.buttonbase#labeldisplay -->
<s:label id="labeldisplay"
textalign="center"
maxdisplayedlines="1"
fontsize="20"
horizontalcenter="0" verticalcenter="1" verticalalign="middle"
left="10" right="10" top="2" bottom="2"
color.up="0xffffff">
</s:label>

</s:sparkbuttonskin>