You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/12/28 18:49:07 UTC

[royale-asjs] branch develop updated: tour-de-jewel: show StyledUIBase width defaults capabilities

This is an automated email from the ASF dual-hosted git repository.

carlosrovira 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 36ca70d  tour-de-jewel: show StyledUIBase width defaults capabilities
36ca70d is described below

commit 36ca70d59697027a25bf50e0a4818c9c4216587d
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sat Dec 28 19:48:58 2019 +0100

    tour-de-jewel: show StyledUIBase width defaults capabilities
---
 examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml
index 5731206..e57e608 100644
--- a/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/ButtonPlayGround.mxml
@@ -26,7 +26,9 @@ limitations under the License.
 	<fx:Script>
 		<![CDATA[      
             private function clickHandler(event:MouseEvent):void {
-                button.emphasis = (button.emphasis == Button.PRIMARY) ? "" : Button.PRIMARY;
+                event.target.emphasis = event.target.emphasis == Button.PRIMARY ? "" : Button.PRIMARY;
+				event.target.width = event.target.emphasis == Button.PRIMARY ? NaN : 250;
+				event.target.text = event.target.emphasis == Button.PRIMARY ? "Width 'auto'" : "Width = 250";
             }
 
 			private function onValueChange(event:Event):void
@@ -47,7 +49,8 @@ limitations under the License.
 			<j:Card>
 				<html:H3 text="Jewel Button"/>
 
-				<j:Button text="Default" id="button" click="clickHandler(event)"/>
+				<j:Button text="Default"/>
+				<j:Button text="Show Width Defaults" click="clickHandler(event)" width="250"/>
 				<j:Button text="Disabled">
 					<j:beads>
 						<j:Disabled/>