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 2018/09/28 03:42:53 UTC
[royale-asjs] 13/21: size to contentarea to content unless Panel is
sized by parent
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 d4fded5c66e0634f72fee8b5e1f10d53a88c4e2a
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Sep 27 00:44:06 2018 -0700
size to contentarea to content unless Panel is sized by parent
---
.../MXRoyale/src/main/royale/mx/containers/beads/PanelView.as | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as
index 84bac6c..5d169a2 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/beads/PanelView.as
@@ -29,6 +29,7 @@ import mx.containers.beads.models.PanelModel;
import mx.core.ContainerLayout;
import org.apache.royale.core.IBead;
+import org.apache.royale.core.ILayoutChild;
import org.apache.royale.core.IStrand;
import org.apache.royale.core.UIBase;
import org.apache.royale.html.beads.PanelView;
@@ -97,8 +98,11 @@ public class PanelView extends org.apache.royale.html.beads.PanelView
{
titleBar.percentWidth = 100;
- contentArea.percentWidth = 100;
- contentArea.percentHeight = 100;
+ var panel:ILayoutChild = host as ILayoutChild;
+ if (!panel.isWidthSizedToContent())
+ contentArea.percentWidth = 100;
+ if (!panel.isHeightSizedToContent())
+ contentArea.percentHeight = 100;
// Now give the Panel its own layout
var boxLayout:BoxLayout = new BoxLayout();