Skip to content

Commit e20178e

Browse files
committed
Initial import.
0 parents  commit e20178e

File tree

92 files changed

+13230
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+13230
-0
lines changed

LICENSE.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2012 Jin Xin, Warren Seine
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Kingnare Black Theme
2+
====================
3+
4+
Flex 4 dark theme.
5+
Original work from Jin Xin (http://www.kingnare.com/auzn/).
6+
7+
Usage
8+
-----
9+
10+
* Create a new Flex library project
11+
* Include src/kingnare.swf, src/preview.jpg, src/style.css in the assets
12+
* Compile and import the .swc library
13+
14+
Contribute
15+
----------
16+
17+
`kingnare-black-theme` is MIT-licensed.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!--
4+
5+
ADOBE SYSTEMS INCORPORATED
6+
Copyright 2008 Adobe Systems Incorporated
7+
All Rights Reserved.
8+
9+
NOTICE: Adobe permits you to use, modify, and distribute this file
10+
in accordance with the terms of the license agreement accompanying it.
11+
12+
-->
13+
14+
<!--- The Spark skin class for the header of the MX Accordion container.
15+
16+
@see mx.containers.Accordion
17+
18+
@langversion 3.0
19+
@playerversion Flash 10
20+
@playerversion AIR 1.5
21+
@productversion Flex 4
22+
-->
23+
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
24+
minWidth="21" minHeight="21" alpha.disabled="0.5">
25+
26+
<fx:Script>
27+
/**
28+
* @private
29+
*/
30+
override protected function initializationComplete():void
31+
{
32+
useChromeColor = true;
33+
super.initializationComplete();
34+
}
35+
</fx:Script>
36+
37+
<!-- states -->
38+
<s:states>
39+
<s:State name="up" />
40+
<s:State name="over" />
41+
<s:State name="down" />
42+
<s:State name="disabled" />
43+
<s:State name="selectedUp" />
44+
<s:State name="selectedOver" />
45+
<s:State name="selectedDown" />
46+
<s:State name="selectedDisabled" />
47+
</s:states>
48+
49+
<!-- layer 3: fill -->
50+
<s:Rect left="1" right="1" top="1" bottom="1">
51+
<s:fill>
52+
<s:LinearGradient rotation="90">
53+
<s:GradientEntry color="0xFFFFFF"
54+
color.over="0xBBBDBD"
55+
color.down="0xAAAAAA"
56+
alpha="0.85" />
57+
<s:GradientEntry color="0xD8D8D8"
58+
color.over="0x9FA0A1"
59+
color.down="0x929496"
60+
alpha="0.85" />
61+
</s:LinearGradient>
62+
</s:fill>
63+
</s:Rect>
64+
65+
<!-- layer 4: fill lowlight -->
66+
<s:Rect left="1" right="1" top="1" bottom="1">
67+
<s:fill>
68+
<s:LinearGradient rotation="270">
69+
<s:GradientEntry color="0x000000" ratio="0.0" alpha="0.0627" />
70+
<s:GradientEntry color="0x000000" ratio="0.48" alpha="0.0099" />
71+
<s:GradientEntry color="0x000000" ratio="0.48001" alpha="0" />
72+
</s:LinearGradient>
73+
</s:fill>
74+
</s:Rect>
75+
76+
<!-- layer 5: fill highlight -->
77+
<s:Rect left="1" right="1" top="1" bottom="1">
78+
<s:fill>
79+
<s:LinearGradient rotation="90">
80+
<s:GradientEntry color="0xFFFFFF"
81+
ratio="0.0"
82+
alpha="0.33"
83+
alpha.over="0.22"
84+
alpha.down="0.12"/>
85+
<s:GradientEntry color="0xFFFFFF"
86+
ratio="0.48"
87+
alpha="0.33"
88+
alpha.over="0.22"
89+
alpha.down="0.12" />
90+
<s:GradientEntry color="0xFFFFFF"
91+
ratio="0.48001"
92+
alpha="0" />
93+
</s:LinearGradient>
94+
</s:fill>
95+
</s:Rect>
96+
97+
<!-- layer 6: highlight stroke (all states except down) -->
98+
<s:Rect left="1" right="1" top="1" bottom="1" excludeFrom="down">
99+
<s:stroke>
100+
<s:LinearGradientStroke rotation="90">
101+
<s:GradientEntry color="0xFFFFFF" alpha.over="0.22" />
102+
<s:GradientEntry color="0xD8D8D8" alpha.over="0.22" />
103+
</s:LinearGradientStroke>
104+
</s:stroke>
105+
</s:Rect>
106+
107+
<!-- layer 6: highlight stroke (down state only) -->
108+
<s:Rect left="1" top="1" bottom="1" width="1" includeIn="down">
109+
<s:fill>
110+
<s:SolidColor color="0x000000" alpha="0.07" />
111+
</s:fill>
112+
</s:Rect>
113+
<s:Rect right="1" top="1" bottom="1" width="1" includeIn="down">
114+
<s:fill>
115+
<s:SolidColor color="0x000000" alpha="0.07" />
116+
</s:fill>
117+
</s:Rect>
118+
<s:Rect left="1" top="1" right="1" height="1" includeIn="down">
119+
<s:fill>
120+
<s:SolidColor color="0x000000" alpha="0.25" />
121+
</s:fill>
122+
</s:Rect>
123+
<s:Rect left="1" top="2" right="1" height="1" includeIn="down">
124+
<s:fill>
125+
<s:SolidColor color="0x000000" alpha="0.09" />
126+
</s:fill>
127+
</s:Rect>
128+
129+
<!-- layer 2: border -->
130+
<s:Rect left="0" right="0" top="0" bottom="0" width="69" height="20">
131+
<s:stroke>
132+
<s:SolidColorStroke color="0x696969"
133+
alpha="1"
134+
alpha.over="1"
135+
alpha.down="1" />
136+
</s:stroke>
137+
</s:Rect>
138+
139+
</s:SparkSkin>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
4+
ADOBE SYSTEMS INCORPORATED
5+
Copyright 2009 Adobe Systems Incorporated
6+
All Rights Reserved.
7+
8+
NOTICE: Adobe permits you to use, modify, and distribute this file
9+
in accordance with the terms of the license agreement accompanying it.
10+
11+
-->
12+
<!--- The Spark skin class for the Halo Border base class.
13+
14+
@langversion 3.0
15+
@playerversion Flash 10
16+
@playerversion AIR 1.5
17+
@productversion Flex 4
18+
-->
19+
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
20+
implements="mx.core.IRectangularBorder" mouseEnabled="false" mouseChildren="false">
21+
22+
<fx:Script>
23+
<![CDATA[
24+
import mx.core.EdgeMetrics;
25+
import mx.core.IUIComponent;
26+
import mx.graphics.RectangularDropShadow;
27+
28+
static private const metrics:EdgeMetrics = new EdgeMetrics(1, 1, 1, 1);
29+
30+
[Bindable]
31+
public var cornerRadius:Number = 0;
32+
33+
private var dropShadow:RectangularDropShadow;
34+
35+
public function get borderMetrics():EdgeMetrics
36+
{
37+
if (getStyle("borderVisible") == false ||
38+
getStyle("borderStyle") == "none")
39+
return EdgeMetrics.EMPTY;
40+
41+
return metrics;
42+
}
43+
44+
public function get backgroundImageBounds():Rectangle
45+
{
46+
return null;
47+
}
48+
49+
public function set backgroundImageBounds(value:Rectangle):void
50+
{
51+
52+
}
53+
54+
public function get hasBackgroundImage():Boolean
55+
{
56+
return false;
57+
}
58+
59+
public function layoutBackgroundImage():void
60+
{
61+
62+
}
63+
64+
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
65+
{
66+
// Force a redraw to clear any existing shadow, and to force a redraw of the
67+
// border/background.
68+
redrawRequested = true;
69+
70+
if (getStyle("borderVisible") == false || getStyle("borderStyle") == "none")
71+
{
72+
border.visible = false;
73+
background.left = background.top = background.right = background.bottom = 0;
74+
}
75+
else
76+
{
77+
border.visible = true;
78+
background.left = background.top = background.right = background.bottom = 1;
79+
}
80+
81+
border.radiusX = cornerRadius;
82+
background.radiusX = cornerRadius;
83+
84+
super.updateDisplayList(unscaledWidth, unscaledHeight);
85+
86+
if (parent && parent is IUIComponent && !IUIComponent(parent).enabled)
87+
alpha = 0.5;
88+
else
89+
alpha = 1;
90+
91+
// Draw drop shadow, if needed
92+
if (getStyle("dropShadowVisible") == false ||
93+
width == 0 ||
94+
height == 0)
95+
{
96+
return;
97+
}
98+
99+
// Create a RectangularDropShadow object, set its properties,
100+
// and draw the shadow
101+
if (!dropShadow)
102+
dropShadow = new RectangularDropShadow();
103+
104+
dropShadow.distance = 5;
105+
dropShadow.angle = 90;
106+
dropShadow.color = 0;
107+
dropShadow.alpha = 0.8;
108+
dropShadow.blurX = 20;
109+
dropShadow.blurY = 20;
110+
111+
// Clear out any pending line style
112+
graphics.lineStyle();
113+
dropShadow.drawShadow(graphics, 0, 0, width, height);
114+
}
115+
116+
private function getDropShadowAngle(distance:Number,
117+
direction:String):Number
118+
{
119+
if (direction == "left")
120+
return distance >= 0 ? 135 : 225;
121+
122+
else if (direction == "right")
123+
return distance >= 0 ? 45 : 315;
124+
125+
else // direction == "center"
126+
return distance >= 0 ? 90 : 270;
127+
}
128+
]]>
129+
</fx:Script>
130+
131+
<!-- border -->
132+
<s:Rect left="0" right="0" top="0" bottom="0" radiusX="0" id="border">
133+
<s:stroke>
134+
<s:SolidColorStroke id="borderStroke" color="0x000000"/>
135+
</s:stroke>
136+
</s:Rect>
137+
138+
<!-- fill -->
139+
<s:Rect id="background" left="1" right="1" top="1" bottom="1" radiusX="0">
140+
<s:fill>
141+
<s:SolidColor id="bgFill" color="0x222222" />
142+
</s:fill>
143+
</s:Rect>
144+
</s:Skin>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
3+
xmlns:s="library://ns.adobe.com/flex/spark"
4+
xmlns:mx="library://ns.adobe.com/flex/mx">
5+
<!-- host component -->
6+
<fx:Metadata>
7+
[HostComponent("spark.components.BorderContainer")]
8+
</fx:Metadata>
9+
10+
<fx:Script>
11+
<![CDATA[
12+
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
13+
{
14+
super.updateDisplayList(unscaledWidth, unscaledHeight);
15+
16+
bgFill.color = getStyle("backgroundColor");
17+
}
18+
]]>
19+
</fx:Script>
20+
21+
<!-- states -->
22+
<s:states>
23+
<s:State name="disabled" />
24+
<s:State name="normal" />
25+
</s:states>
26+
27+
<!-- outer border -->
28+
<s:Rect left="-2" right="-2" top="-2" bottom="-2" radiusX="0" id="outerborder">
29+
<s:stroke>
30+
<s:SolidColorStroke color="0xFFFFFF" alpha="0.12"/>
31+
</s:stroke>
32+
</s:Rect>
33+
34+
<!-- inner border -->
35+
<s:Rect left="-1" right="-1" top="-1" bottom="-1" radiusX="0" id="innerborder">
36+
<s:stroke>
37+
<s:SolidColorStroke color="0x000000" alpha="1"/>
38+
</s:stroke>
39+
</s:Rect>
40+
41+
<!-- fill -->
42+
<s:Rect id="background" left="0" right="0" top="0" bottom="0" radiusX="0">
43+
<s:fill>
44+
<s:SolidColor id="bgFill" color="0x222222" />
45+
</s:fill>
46+
</s:Rect>
47+
48+
<s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" minWidth="0" minHeight="0">
49+
<s:layout>
50+
<s:BasicLayout/>
51+
</s:layout>
52+
</s:Group>
53+
54+
</s:Skin>

0 commit comments

Comments
 (0)