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/11/21 09:11:22 UTC
[royale-asjs] branch develop updated (90c48e0 -> d14a4ab)
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.
from 90c48e0 fill out adg with alternating row colors
new cd1e3c6 fix warnings
new d14a4ab support non-CSS compliant backgroundAlpha in UIComponent. Should fix #566
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../beads/DataGridLinesBeadForICollectionView.as | 3 +-
.../src/main/royale/mx/core/UIComponent.as | 39 +++++++++++++++++++---
2 files changed, 36 insertions(+), 6 deletions(-)
[royale-asjs] 02/02: support non-CSS compliant backgroundAlpha in
UIComponent. Should fix #566
Posted by ah...@apache.org.
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
commit d14a4ab2649c01465cd8893e15e86e3ebe037f7a
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Nov 21 00:49:04 2019 -0800
support non-CSS compliant backgroundAlpha in UIComponent. Should fix #566
---
.../src/main/royale/mx/core/UIComponent.as | 39 +++++++++++++++++++---
1 file changed, 34 insertions(+), 5 deletions(-)
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 d22549a..4d62f55 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -85,6 +85,7 @@ import org.apache.royale.html.beads.DisableBead;
import org.apache.royale.html.beads.DisabledAlphaBead;
import org.apache.royale.html.supportClasses.ContainerContentArea;
import org.apache.royale.utils.PointUtils;
+import org.apache.royale.utils.CSSUtils;
import org.apache.royale.utils.loadBeadFromValuesManager;
import mx.validators.IValidatorListener;
@@ -4883,6 +4884,9 @@ COMPILE::JS
return value;
}
+ private var _backgroundAlpha:Number = NaN;
+ private var _backgroundColor:String = null;
+
/**
* Sets a style property on this component instance.
*
@@ -4902,13 +4906,38 @@ COMPILE::JS
*/
public function setStyle(styleProp:String, newValue:*):void
{
- if (!style)
- style = new FlexCSSStyles();
- style[styleProp] = newValue;
+ if (styleProp == "backgroundAlpha")
+ _backgroundAlpha = Number(newValue);
+ else
+ {
+ if (styleProp == "backgroundColor")
+ {
+ if (typeof(newValue) === 'number')
+ _backgroundColor = CSSUtils.attributeFromColor(newValue);
+ else
+ _backgroundColor = String(newValue);
+ }
+ if (!style)
+ style = new FlexCSSStyles();
+ style[styleProp] = newValue;
+ COMPILE::JS
+ {
+ if (initialized)
+ {
+ ValuesManager.valuesImpl.applyStyles(this, style);
+ }
+ }
+ }
COMPILE::JS
{
- if (initialized)
- ValuesManager.valuesImpl.applyStyles(this, style);
+ 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;
+ }
}
}
[royale-asjs] 01/02: fix warnings
Posted by ah...@apache.org.
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
commit cd1e3c604d8392e162b6b733f50ef63ab4dcb167
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Nov 21 00:48:37 2019 -0800
fix warnings
---
.../royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as
index 54ada07..85e1770 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/DataGridLinesBeadForICollectionView.as
@@ -92,6 +92,7 @@ package mx.controls.beads
_overlay.element.style.position = "absolute";
}
+ var i:int;
var xpos:Number = 0;
_overlay.clear();
@@ -114,7 +115,7 @@ package mx.controls.beads
_overlay.fill = lineFill;
// draw the verticals
- for (var i:int=0; i < columns.length - 1; i++) {
+ for (i=0; i < columns.length - 1; i++) {
var column:AdvancedDataGridColumn = columns[i] as AdvancedDataGridColumn;
if (column.visible)
{