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 efcd43c6e1 Emulation - prepare Panel layout for control bar 
implementation.
efcd43c6e1 is described below

commit efcd43c6e12f135706cee8f81b3fef975d17f65a
Author: Yishay Weiss <[email protected]>
AuthorDate: Tue Sep 6 09:50:47 2022 +0300

    Emulation - prepare Panel layout for control bar implementation.
---
 .../MXRoyale/src/main/royale/mx/containers/beads/PanelView.as     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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 4dd00f4b49..021849d688 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
@@ -177,6 +177,7 @@ class PanelLayout extends LayoutBase
         var panel:Panel = host as Panel;
         var titleBar:UIComponent = panel.$getElementAt(0) as UIComponent;
         var content:UIComponent = panel.$getElementAt(1) as UIComponent;
+        var controlBar:UIComponent = panel.numElements > 2 ? 
panel.$getElementAt(2) as UIComponent : null;
         var w:Number = panel.width;
         var h:Number = panel.height;
         if (panel.isWidthSizedToContent())
@@ -184,8 +185,13 @@ class PanelLayout extends LayoutBase
         if (panel.isHeightSizedToContent())
             h = content.height + 2 + titleBar.getExplicitOrMeasuredHeight();
         titleBar.setActualSize(w - 2, titleBar.getExplicitOrMeasuredHeight());
-        content.setActualSize(w - 2, h - titleBar.height - 2 - 1);
+        var contentHeight:Number = h - titleBar.height - 4 - (controlBar ? 
controlBar.height : 0);
+        content.setActualSize(w - 2, contentHeight);
         content.move(0, titleBar.height + 1);
+        if (controlBar)
+        {
+            controlBar.move(0, titleBar.height + 1 + contentHeight + 1);
+        }
         return false;
     }
 }
\ No newline at end of file

Reply via email to