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/12/16 17:56:19 UTC

[royale-asjs] branch develop updated: MX Alert always has titlebar even if no title. Should fix #623

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


The following commit(s) were added to refs/heads/develop by this push:
     new a994d59  MX Alert always has titlebar even if no title.  Should fix #623
a994d59 is described below

commit a994d5997b2c53c2f6b4901ce9d404494b9a13a3
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Dec 16 09:55:59 2019 -0800

    MX Alert always has titlebar even if no title.  Should fix #623
---
 .../src/main/royale/mx/controls/beads/AlertView.as      | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AlertView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AlertView.as
index 3a4738f..c5503b9 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AlertView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/AlertView.as
@@ -18,7 +18,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 package mx.controls.beads
 {
+    import org.apache.royale.core.IAlertModel;
+    import org.apache.royale.core.IParent;
+    import org.apache.royale.core.IStrand;
     import org.apache.royale.core.UIBase;
+    import org.apache.royale.html.TitleBar;
     import org.apache.royale.html.beads.AlertView;
 	
     /**
@@ -43,6 +47,19 @@ package mx.controls.beads
 		{
         }
 
+        override public function set strand(value:IStrand):void
+        {
+            super.strand = value;
+            // MX Alert always has title bar
+            if (!alertModel.title)
+            {
+                titleBar = new TitleBar();
+                titleBar.height = 25;
+                titleBar.title = alertModel.title;
+                IParent(_strand).addElementAt(titleBar, 0);
+            }            
+        }
+        
         /**
          * The content area of the panel.
          *