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 0d9330b Some improvements to sizing of mx combobox
0d9330b is described below
commit 0d9330bb77365a7f02c3b661a1d2cc8b4da979ec
Author: Yishay Weiss <[email protected]>
AuthorDate: Mon Dec 20 11:46:42 2021 +0200
Some improvements to sizing of mx combobox
---
.../MXRoyale/src/main/royale/mx/controls/ComboBox.as | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
index ddd2aa9..ac69a5b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
@@ -34,6 +34,7 @@ import mx.core.mx_internal;
import mx.effects.Tween;
import org.apache.royale.geom.Rectangle;
import org.apache.royale.geom.Point;
+import org.apache.royale.core.IUIBase;
import mx.managers.ISystemManager;
import mx.events.FlexMouseEvent;
import mx.core.UIComponentGlobals;
@@ -1548,6 +1549,21 @@ public class ComboBox extends ComboBase
dispatchEvent(new Event("dropdownWidthChanged"));
}
+ // the following override is necessary as long as the view is not a
UIComponent and getExplicitOrMeasuredHeight fails
+ override public function get measuredHeight():Number
+ {
+ var comboView:IComboBoxView = view as IComboBoxView;
+ return Math.max((comboView.textInputField as IUIBase).height,
(comboView.popupButton as IUIBase).height);
+ }
+
+ // Make sure Basic components scale correctly in height
+ override public function set explicitHeight(value:Number):void
+ {
+ super.explicitHeight = value;
+ var comboView:IComboBoxView = view as IComboBoxView;
+ (comboView.textInputField as IUIBase).height = value;
+ (comboView.popupButton as IUIBase).height = value;
+ }