You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/12/04 06:50:13 UTC
[royale-asjs] branch develop updated: another scenario for #566
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new e050085 another scenario for #566
e050085 is described below
commit e050085d5cb3ffdec17f3a383f90a973f0f46c7f
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Dec 3 22:49:53 2019 -0800
another scenario for #566
---
.../MXRoyale/src/main/royale/mx/core/UIComponent.as | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 82557df..f1ea1d3 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -1945,6 +1945,19 @@ COMPILE::JS
}
super.addedToParent();
+ COMPILE::JS
+ {
+ if (!isNaN(_backgroundAlpha) && _backgroundColor !== null)
+ {
+ var red:Number = parseInt("0x" + _backgroundColor.substring(1, 3));
+ var green:Number = parseInt("0x" + _backgroundColor.substring(3, 5));
+ var blue:Number = parseInt("0x" + _backgroundColor.substring(5, 7));
+ var rgba:String = "rgba(" + red + "," + green + "," + blue + "," + _backgroundAlpha + ")";
+ (element as HTMLElement).style['backgroundColor'] = rgba;
+ }
+ }
+
+
if (!initialized)
{
initialize();