hackedteam/rcs-console

View on GitHub
src/it/ht/rcs/console/skins/TitleWindowMaxButtonSkin.mxml

Summary

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

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.
    
    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default skin class for the close button of the Spark TitleWindow component.  

     @see spark.skins.spark.TitleWindowSkin     
     @see spark.components.TitleWindow

     @langversion 3.0
     @playerversion Flash 10
     @playerversion AIR 1.5
     @productversion Flex 4
-->
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled="0.5">
    
    <!-- host component -->
    <fx:Metadata>
        <![CDATA[ 
        /** 
         * @copy spark.skins.spark.ApplicationSkin#hostComponent
         */
        [HostComponent("spark.components.Button")]
        ]]>
    </fx:Metadata> 
    
    <fx:Script fb:purpose="styling">
        /* Define the skin elements that should not be colorized. 
        For closeButton, the graphics are colorized but the x is not. */
        static private const exclusions:Array = ["xSymbol"];
        
        /** 
         * @private
         */     
        override public function get colorizeExclusions():Array {return exclusions;}
        
        /* Define the symbol fill items that should be colored by the "symbolColor" style. */
        static private const symbols:Array = [];
        
        /**
         * @private
         */
        override public function get symbolItems():Array {return symbols};
    </fx:Script>
    
    <s:states>
        <s:State name="up" />
        <s:State name="over"/>
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    
    <!--- Define the drop shadow for the close button. -->
    <s:RectangularDropShadow id="dropShadow" blurX="0" blurY="0" alpha="0" 
                             alpha.over="0.85" alpha.down=".85" distance="1"
                             angle="90" color="0xFFFFFF" left="0" top="0" right="0" bottom="0"/>
    
    <!--- Define the border and fill. -->
    <s:Rect left="0" top="0" right="0" bottom="0">
        <s:stroke>
            <s:SolidColorStroke color="0x000000"
                                alpha="0.0"
                                alpha.over="0.7"
                                alpha.down="0.7"
                                weight="1"/>
        </s:stroke>
        <s:fill>
            <s:SolidColor color="0xCCCCCC" alpha="0" alpha.down="0.7" />
        </s:fill>
    </s:Rect>
    
    <!--- Define the inner shadow. -->
    <s:Rect id="cbshad" left="1" right="1" top="1" height="1" >
        <s:fill>
            <s:SolidColor color="0x000000" color.over="0xFFFFFF" alpha="0" alpha.over=".85" alpha.down="0.22" />
        </s:fill>
    </s:Rect>
    
    <!--- Defines the appearance of the x in the close button. -->
    <s:Group top="1" left="1" id="xSymbol">     
      <s:BitmapImage source="@Embed('img/windows/max.png')"
                     source.over="@Embed('img/windows/max.png')"
                     source.down="@Embed('img/windows/max.png')"
                     source.disabled="@Embed('img/windows/max.png')" />
    </s:Group>
</s:SparkSkin>