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/05/02 07:01:33 UTC
[royale-asjs] branch develop updated: buttons ask for parent layout
when label changes. Should fix #818
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 17f2b9b buttons ask for parent layout when label changes. Should fix #818
17f2b9b is described below
commit 17f2b9bc4706e0a59c041ef29c7581ca19c0f35e
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sat May 2 00:01:07 2020 -0700
buttons ask for parent layout when label changes. Should fix #818
---
frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as | 3 +++
frameworks/projects/SparkRoyale/src/main/resources/defaults.css | 1 +
.../src/main/royale/spark/components/supportClasses/ButtonBase.as | 4 ++++
3 files changed, 8 insertions(+)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
index caf0801..2df612c 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
@@ -36,6 +36,7 @@ import mx.events.FlexEvent;
import org.apache.royale.binding.ItemRendererDataBinding;
import org.apache.royale.core.ITextModel;
import org.apache.royale.events.Event;
+import org.apache.royale.events.IEventDispatcher;
import org.apache.royale.html.accessories.ToolTipBead;
import org.apache.royale.html.beads.models.ImageAndTextModel;
@@ -356,6 +357,8 @@ public class Button extends UIComponent implements IDataRenderer, IListItemRende
COMPILE::JS {
setInnerHTML();
}
+ if (parent)
+ (parent as IEventDispatcher).dispatchEvent(new Event("layoutNeeded"));
}
//----------------------------------
diff --git a/frameworks/projects/SparkRoyale/src/main/resources/defaults.css b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
index ef36043..c80208d 100644
--- a/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
+++ b/frameworks/projects/SparkRoyale/src/main/resources/defaults.css
@@ -39,6 +39,7 @@ global {
Button
{
IBeadModel: ClassReference("org.apache.royale.html.beads.models.ImageAndTextModel");
+ white-space: nowrap;
}
CheckBox
{
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
index 9393500..51407f5 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
@@ -48,6 +48,8 @@ import spark.primitives.BitmapImage;
use namespace mx_internal;
*/
import org.apache.royale.core.ITextModel;
+import org.apache.royale.events.Event;
+import org.apache.royale.events.IEventDispatcher;
import mx.managers.IFocusManagerComponent;
//--------------------------------------
@@ -414,6 +416,8 @@ public class ButtonBase extends SkinnableComponent implements IFocusManagerCompo
COMPILE::JS {
setInnerHTML();
}
+ if (parent)
+ (parent as IEventDispatcher).dispatchEvent(new Event("layoutNeeded"));
}
/**