flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [08/10] git commit: [flex-asjs] [refs/heads/develop] - support solid backgroundcolor
Date Sat, 10 Jan 2015 07:46:14 GMT
support solid backgroundcolor


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/639ba6fb
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/639ba6fb
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/639ba6fb

Branch: refs/heads/develop
Commit: 639ba6fb32df938ac4b464e3c0db6be3aa802262
Parents: 99d85c3
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jan 9 23:40:12 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 9 23:45:58 2015 -0800

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/core/CSSTextField.as | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/639ba6fb/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
index fa23ccd..16718c4 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
@@ -19,7 +19,7 @@
 package org.apache.flex.core
 {
 	import flash.text.TextField;
-    import flash.text.TextFieldAutoSize;
+	import flash.text.TextFieldAutoSize;
 	import flash.text.TextFormat;
 	
 	import org.apache.flex.core.ValuesManager;
@@ -94,7 +94,17 @@ package org.apache.flex.core
                 tf.align = "right";
 				autoSize = TextFieldAutoSize.NONE;	
 			}
-
+            var backgroundColor:Object = ValuesManager.valuesImpl.getValue(sp, "background-color");
+            if (backgroundColor != null)
+            {
+                this.background = true;
+                if (backgroundColor is String)
+                {
+                    backgroundColor = backgroundColor.replace("#", "0x");
+                    backgroundColor = uint(backgroundColor);
+                }
+                this.backgroundColor = backgroundColor as uint;
+            }
 			defaultTextFormat = tf;
 			super.text = value;
 		}


Mime
View raw message