flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aka...@apache.org
Subject [1/2] git commit: [flex-sdk] [refs/heads/develop] - Fixes a bug on FlatSpark Button and ButtonIcon skins when borderRadius is changed
Date Wed, 07 Jan 2015 08:58:03 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/develop 6dadf6ddf -> 395116b73


Fixes a bug on FlatSpark Button and ButtonIcon skins when borderRadius is changed

Removed Up, Over, Down and Disabled states in favor of just using color.[state]


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/3b67d095
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/3b67d095
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/3b67d095

Branch: refs/heads/develop
Commit: 3b67d09565a00d258d79a4c24c800da089f461fe
Parents: 6dadf6d
Author: Mahmoud Ali <akamud@apache.org>
Authored: Wed Jan 7 05:55:16 2015 -0300
Committer: Mahmoud Ali <akamud@apache.org>
Committed: Wed Jan 7 05:55:16 2015 -0300

----------------------------------------------------------------------
 .../src/flatspark/skins/ButtonIconSkin.mxml     | 31 ++++--------------
 .../src/flatspark/skins/ButtonSkin.mxml         | 33 +++++---------------
 2 files changed, 13 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3b67d095/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml
index 6965f79..f4a71fa 100644
--- a/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml
@@ -75,10 +75,7 @@ limitations under the License.
 				if (cornerRadius != cr)
 				{
 					cornerRadius = cr;
-					fill_up.radiusX = cornerRadius;
-					fill_over.radiusX = cornerRadius;
-					fill_down.radiusX = cornerRadius;
-					fill_disabled.radiusX = cornerRadius;
+					fill.radiusX = cornerRadius;
 				}
 				
 				super.updateDisplayList(unscaledWidth, unscaledHeight);
@@ -165,31 +162,15 @@ limitations under the License.
 	
 	<!-- layer 2: fill -->
 	<!--- @private -->
-	<s:Rect id="fill_up" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="up">
+	<s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="6">
 		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateUp)}"/>
+			<s:SolidColor color.up="{ColorUtils.ButtonColor(hostComponent.brand,stateUp)}"
+						  color.over="{ColorUtils.ButtonColor(hostComponent.brand,stateOver)}"
+						  color.down="{ColorUtils.ButtonColor(hostComponent.brand,stateDown)}"
+						  color.disabled="{ColorUtils.ButtonColor(hostComponent.brand,stateDisabled)}"/>
 		</s:fill>
 	</s:Rect>
 	
-	<s:Rect id="fill_over" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="over">
-		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateOver)}"/>
-		</s:fill>
-	</s:Rect>
-	
-	<s:Rect id="fill_down" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="down">
-		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateDown)}"/>
-		</s:fill>
-	</s:Rect>
-	
-	<s:Rect id="fill_disabled" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="disabled">
-		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateDisabled)}"/>
-		</s:fill>
-	</s:Rect>
-	
-	
 	<!-- layer 8: text -->
 	<!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay  -->
 	<s:HGroup verticalAlign="middle" verticalCenter="0" horizontalAlign="center" horizontalCenter="0"
left="10" right="10" top="2" bottom="2">

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/3b67d095/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml
index 966497f..fc12a06 100644
--- a/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml
@@ -75,10 +75,7 @@ limitations under the License.
 				if (cornerRadius != cr)
 				{
 					cornerRadius = cr;
-					fill_up.radiusX = cornerRadius;
-					fill_over.radiusX = cornerRadius;
-					fill_down.radiusX = cornerRadius;
-					fill_disabled.radiusX = cornerRadius;
+					fill.radiusX = cornerRadius;
 				}
 				
 				super.updateDisplayList(unscaledWidth, unscaledHeight);
@@ -126,31 +123,15 @@ limitations under the License.
 	
 	<!-- layer 2: fill -->
 	<!--- @private -->
-	<s:Rect id="fill_up" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="up">
+	<s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="6">
 		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateUp)}"/>
+			<s:SolidColor color.up="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateUp)}"
+						  color.over="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateOver)}"
+						  color.down="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDown)}"
+						  color.disabled="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDisabled)}"/>
 		</s:fill>
 	</s:Rect>
-	
-	<s:Rect id="fill_over" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="over">
-		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateOver)}"/>
-		</s:fill>
-	</s:Rect>
-	
-	<s:Rect id="fill_down" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="down">
-		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDown)}"/>
-		</s:fill>
-	</s:Rect>
-	
-	<s:Rect id="fill_disabled" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="disabled">
-		<s:fill>
-			<s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDisabled)}"/>
-		</s:fill>
-	</s:Rect>
-	
-	
+		
 	<!-- layer 8: text -->
 	<!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay  -->
 	<!--- @see initializationComplete() -->


Mime
View raw message