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 2020/11/23 04:53:55 UTC

[royale-asjs] branch develop updated (0c08c23 -> 490f032)

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 0c08c23  Merge pull request #948 from estanglerbm/urlvariables-in-mx
     new 0e8d9c8  handle sizedToContent without skins
     new 490f032  Scroller measures viewport.  Should fix #944

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:
 .../src/main/royale/spark/components/Scroller.as   | 16 +++++++++++++
 .../components/beads/SkinnableContainerView.as     | 27 +++++++++++++---------
 2 files changed, 32 insertions(+), 11 deletions(-)


[royale-asjs] 02/02: Scroller measures viewport. Should fix #944

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 490f032f326abd049decccdffdd6fb1d6adf8743
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Nov 22 20:53:11 2020 -0800

    Scroller measures viewport.  Should fix #944
---
 .../src/main/royale/spark/components/Scroller.as         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
index a88f3f8..3330ecd 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
@@ -3912,6 +3912,22 @@ public class Scroller extends SkinnableComponent
 		if (vp.isHeightSizedToContent())
         		vp.setHeight(height);
     }
+
+	override public function get measuredWidth():Number
+	{
+		var vp:UIComponent = _viewport as UIComponent;
+		if (vp)
+			return vp.measuredWidth;
+		return super.measuredWidth;
+	}
+	
+	override public function get measuredHeight():Number
+	{
+		var vp:UIComponent = _viewport as UIComponent;
+		if (vp)
+			return vp.measuredHeight;
+		return super.measuredHeight;
+	}	
 }
 
 }


[royale-asjs] 01/02: handle sizedToContent without skins

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 0e8d9c8c1f0e212f8c9034a9de4ca659e05c987e
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Nov 22 20:52:36 2020 -0800

    handle sizedToContent without skins
---
 .../components/beads/SkinnableContainerView.as     | 27 +++++++++++++---------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SkinnableContainerView.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SkinnableContainerView.as
index 29ad36b..70f322f 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SkinnableContainerView.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SkinnableContainerView.as
@@ -102,20 +102,25 @@ public class SkinnableContainerView extends SparkContainerView
         {
             if (host.skin)
             {
-		    (host.skin as Skin).layout.measure();
-		    if (host.isWidthSizedToContent()) 
-		    {
-			    host.skin.setLayoutBoundsSize(NaN, host.height);
-			    host.measuredWidth = host.skin.measuredWidth;
-		    } else
-		    {
-			    host.skin.setLayoutBoundsSize(host.width, NaN);
-			    host.measuredHeight = host.skin.measuredHeight;
-		    }
+			    (host.skin as Skin).layout.measure();
+			    if (host.isWidthSizedToContent()) 
+			    {
+				    host.skin.setLayoutBoundsSize(NaN, host.height);
+				    host.measuredWidth = host.skin.measuredWidth;
+			    } else
+			    {
+				    host.skin.setLayoutBoundsSize(host.width, NaN);
+				    host.measuredHeight = host.skin.measuredHeight;
+			    }
             }
             else
             {
-                (viewport.contentView as ILayoutChild).setWidthAndHeight(host.width, host.height);
+                if (host.layout == null)
+                    host.layout = new BasicLayout();
+                host.layout.measure();
+				var h:Number = host.isHeightSizedToContent() ? host.measuredHeight : host.height;
+				var w:Number = host.isWidthSizedToContent() ? host.measuredWidth : host.width;
+                (viewport.contentView as ILayoutChild).setWidthAndHeight(w, h);
             }
                 
         }