You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2020/11/17 09:54:58 UTC
[royale-asjs] branch develop updated: Fixes certain scenariuos
where skin isn't laid out correctly because it is erroneously expected to
size to content.
This is an automated email from the ASF dual-hosted git repository.
yishayw 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 d195814 Fixes certain scenariuos where skin isn't laid out correctly because it is erroneously expected to size to content.
new 3299490 Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
d195814 is described below
commit d195814211ad3ada0f00be42cce0491419f8d032
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Tue Nov 17 09:51:47 2020 +0000
Fixes certain scenariuos where skin isn't laid out correctly because it is erroneously expected to size to content.
But there may be other such cases, so not closing bug.
Reference #937
---
.../royale/spark/components/beads/SkinnableContainerView.as | 12 +++++++++---
1 file changed, 9 insertions(+), 3 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 eb369b7..2b1e784 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
@@ -83,7 +83,7 @@ public class SkinnableContainerView extends SparkContainerView
override public function beforeLayout():Boolean
{
var host:SkinnableContainer = _strand as SkinnableContainer;
- if (host.isWidthSizedToContent() || host.isHeightSizedToContent())
+ if (host.isWidthSizedToContent() && host.isHeightSizedToContent())
{
if (host.skin)
{
@@ -102,7 +102,13 @@ public class SkinnableContainerView extends SparkContainerView
{
if (host.skin)
{
- host.skin.setLayoutBoundsSize(host.width, host.height);
+ if (host.isWidthSizedToContent() || host.isHeightSizedToContent())
+ {
+ (host.skin as Skin).layout.measure();
+ }
+ var w:Number = host.isWidthSizedToContent() ? host.skin.measuredWidth : host.width;
+ var h:Number = host.isHeightSizedToContent() ? host.skin.measuredHeight : host.height;
+ host.skin.setLayoutBoundsSize(w, h);
}
else
{
@@ -110,7 +116,7 @@ public class SkinnableContainerView extends SparkContainerView
}
}
- return true;
+ return true;
}
override protected function addViewport():void