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/27 02:33:19 UTC

[royale-asjs] branch develop updated (9602a8c -> ed8999f)

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 9602a8c  Merge pull request #911 from SolidSoft-Lda/develop
     new f5ff2ec  Revert "Temp fix for #952".  Try a different strategy in upcoming commit
     new ed8999f  have dropdown check if sizedToContent and use the same measuredHeight as Flex did.  Should fix #952

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/DropDownList.as   |  6 ++++++
 .../royale/spark/components/beads/DropDownListView.as  |  8 +++++++-
 .../components/supportClasses/DropDownListButton.as    | 18 +++++++++++++-----
 3 files changed, 26 insertions(+), 6 deletions(-)


[royale-asjs] 02/02: have dropdown check if sizedToContent and use the same measuredHeight as Flex did. Should fix #952

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 ed8999f3fc97d0ab422131358aa050ffc7c5c7cd
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Nov 26 18:33:07 2020 -0800

    have dropdown check if sizedToContent and use the same measuredHeight as Flex did.  Should fix #952
---
 .../src/main/royale/spark/components/DropDownList.as         |  6 ++++++
 .../main/royale/spark/components/beads/DropDownListView.as   |  8 +++++++-
 .../spark/components/supportClasses/DropDownListButton.as    | 12 ++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/DropDownList.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/DropDownList.as
index fd18ee1..fd189b4 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/DropDownList.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/DropDownList.as
@@ -333,6 +333,12 @@ public class DropDownList extends DropDownListBase
         }
     } */
     
+    override protected function measure():void
+    {
+        measuredWidth = 112;
+        measuredHeight = 21;
+    }
+
     /**
      *  @private
      */
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/DropDownListView.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/DropDownListView.as
index 9e467ac..b862b7c 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/DropDownListView.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/DropDownListView.as
@@ -181,7 +181,13 @@ package spark.components.beads
         {
             var list:DropDownList = host as DropDownList;
             var view:DropDownListView = list.view as DropDownListView;
-            view.label.setActualSize(list.width, list.height);
+			var w:Number = list.width;
+			if (list.isWidthSizedToContent())
+			    w = list.measuredWidth;
+			var h:Number = list.height;
+			if (list.isHeightSizedToContent())
+			    h = list.measuredHeight;
+            view.label.setActualSize(w, h);
 
             return false;
         }
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as
index e3bdd9f..420e1df 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as
@@ -78,5 +78,17 @@ package spark.components.supportClasses
                 (w - 17) + ',12 L ' + (w - 21) + ',5"</path></svg>';    
             
         }
+
+	    //--------------------------------------------------------------------------
+	    //
+	    //  Overridden methods
+	    //
+	    //--------------------------------------------------------------------------
+	    
+	    override public function get measuredHeight():Number
+	    {
+	        return 21; // maybe measure font someday if fontSize is large
+	    }
+
 	}
 }
\ No newline at end of file


[royale-asjs] 01/02: Revert "Temp fix for #952". Try a different strategy in upcoming commit

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 f5ff2ec5053d603ba90cd0506fd66ae2bedb6ef3
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Nov 26 18:20:24 2020 -0800

    Revert "Temp fix for #952".  Try a different strategy in upcoming commit
    
    This reverts commit a71a8bd25a7ec4d2eef9ac7c0ddd544b61423cee.
---
 .../royale/spark/components/supportClasses/DropDownListButton.as    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as
index 72c5c05..e3bdd9f 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/DropDownListButton.as
@@ -65,11 +65,7 @@ package spark.components.supportClasses
         private function updateSkin(w:Number, h:Number):void
         {
 			var clipid:String = "txtClip" + instanceId;
-			// temp fix for https://github.com/apache/royale-asjs/issues/952
-			//if (h < 4) return;
-			if (h < 15) 
-				return;
-			h = h - 10;
+			if (h < 4) return;
             element.innerHTML = '<svg width="' + w + 'px" height="' +
                 h + 'px" xmlns="http://www.w3.org/2000/svg"><clipPath id="' + clipid + '"><rect x="0" y="0" height="' + h + 
 				'px" width="' + (w - 29) + 'px"/></clipPath><text y="3px" clip-path="url(#' + clipid + ')">' +