flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Adds border support to CSSTextField-based components such as Label. Also fixes coding error that preventing the backgroundColor from being set.
Date Wed, 14 Dec 2016 16:57:24 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop affda1a94 -> 3cfba88b6


Adds border support to CSSTextField-based components such as Label. Also fixes coding error
that preventing the backgroundColor from being set.


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

Branch: refs/heads/develop
Commit: 3cfba88b62a9979a65fa76b1fd51d945ebb23392
Parents: affda1a
Author: Peter Ent <pent@apache.org>
Authored: Wed Dec 14 11:57:22 2016 -0500
Committer: Peter Ent <pent@apache.org>
Committed: Wed Dec 14 11:57:22 2016 -0500

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/core/CSSTextField.as   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3cfba88b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
index 68a8bf3..ffafa18 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
@@ -146,8 +146,17 @@ package org.apache.flex.core
                 if (backgroundColor != null)
                 {
                     background = true;
-                    backgroundColor = CSSUtils.toColor(backgroundColor);
+                    this.backgroundColor = CSSUtils.toColor(backgroundColor);
                 }
+				
+				// supports border: <thickness> solid <color> 
+				var border:Object = ValuesManager.valuesImpl.getValue(sp, "border", styleState);
+				if (border != null && border is Array) {
+					this.border = true;
+					this.borderColor = CSSUtils.toColor(border[2]);
+					this.thickness = Number(border[0]);
+				}
+				// else: add code to look for individual border styles such as border-color.
             }
 			defaultTextFormat = tf;
 			super.text = value;


Mime
View raw message