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 2022/01/12 06:48:21 UTC
[royale-asjs] branch develop updated: Take borders into account when sizing popup button
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 9cfa7df Take borders into account when sizing popup button
new c6dda3d Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
9cfa7df is described below
commit 9cfa7df52e02368024eb9a750141d93de9ba730c
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Wed Jan 12 08:47:52 2022 +0200
Take borders into account when sizing popup button
---
examples/royale/MapSearch/asconfig.json | 1 +
.../src/main/royale/spark/components/beads/DropDownListView.as | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/examples/royale/MapSearch/asconfig.json b/examples/royale/MapSearch/asconfig.json
index 86f60f7..a3b21c7 100644
--- a/examples/royale/MapSearch/asconfig.json
+++ b/examples/royale/MapSearch/asconfig.json
@@ -21,6 +21,7 @@
"compilerOptions": {
"debug": false,
"targets": ["JSRoyale","SWF"],
+ "external-library-path": ["../../../frameworks/projects/GoogleMaps/target/GoogleMaps-0.9.9-SNAPSHOT-js.swc",
"source-map": true
},
"additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
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 80c882c..a27450a 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
@@ -180,6 +180,9 @@ package spark.components.beads
import spark.components.beads.DropDownListView;
import org.apache.royale.core.LayoutBase;
+ import org.apache.royale.core.ValuesManager;
+ import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
+ import org.apache.royale.core.layout.EdgeData;
// this layouts out the one Label/Button.
class DropDownListLayout extends LayoutBase
@@ -194,7 +197,8 @@ package spark.components.beads
var h:Number = list.height;
if (list.isHeightSizedToContent())
h = list.measuredHeight;
- view.label.setActualSize(w, h);
+ var ed:EdgeData = (ValuesManager.valuesImpl as IBorderPaddingMarginValuesImpl).getBorderMetrics(list);
+ view.label.setActualSize(w - ed.right - ed.left, h - ed.top - ed.bottom);
return false;
}