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 2020/03/26 22:47:00 UTC

[royale-asjs] branch develop updated: BE0014: update example with a togglebutton to show/hide the rule

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 432dcd0  BE0014: update example with a togglebutton to show/hide the rule
432dcd0 is described below

commit 432dcd088aad930f80c74871026588464884fc6c
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Mar 26 23:46:55 2020 +0100

    BE0014: update example with a togglebutton to show/hide the rule
---
 examples/blog/BE0014_Working_with_Graphics/pom.xml      | 15 +++++++++++++++
 .../src/main/royale/BE0014_Working_with_Graphics.mxml   | 17 +++++++++++++----
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/examples/blog/BE0014_Working_with_Graphics/pom.xml b/examples/blog/BE0014_Working_with_Graphics/pom.xml
index 8e9335b..f19ebd3 100644
--- a/examples/blog/BE0014_Working_with_Graphics/pom.xml
+++ b/examples/blog/BE0014_Working_with_Graphics/pom.xml
@@ -67,6 +67,14 @@
     </dependency>
     <dependency>
       <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Icons</artifactId>
+      <version>0.9.7-SNAPSHOT</version>
+      <type>swc</type>
+      <scope>theme</scope>
+      <classifier>js</classifier>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.royale.framework</groupId>
       <artifactId>JewelTheme</artifactId>
       <version>0.9.7-SNAPSHOT</version>
       <type>swc</type>
@@ -93,6 +101,13 @@
           <type>swc</type>
           <classifier>swf</classifier>
         </dependency>
+        <dependency>
+          <groupId>org.apache.royale.framework</groupId>
+          <artifactId>Icons</artifactId>
+          <version>0.9.7-SNAPSHOT</version>
+          <type>swc</type>
+          <classifier>swf</classifier>
+        </dependency>
       </dependencies>
     </profile>
   </profiles>
diff --git a/examples/blog/BE0014_Working_with_Graphics/src/main/royale/BE0014_Working_with_Graphics.mxml b/examples/blog/BE0014_Working_with_Graphics/src/main/royale/BE0014_Working_with_Graphics.mxml
index 8f80b4e..794eb7f 100644
--- a/examples/blog/BE0014_Working_with_Graphics/src/main/royale/BE0014_Working_with_Graphics.mxml
+++ b/examples/blog/BE0014_Working_with_Graphics/src/main/royale/BE0014_Working_with_Graphics.mxml
@@ -102,14 +102,23 @@
                         <svg:Image src="assets/bottle-shade.svg" width="400" height="500"/>
                         <!-- main shape -->
                         <svg:Image src="assets/bottle-main.svg" width="400" height="500"/>
-                        
 
                     </j:Container>
                 </j:CardPrimaryContent>
 				<j:CardActions itemsHorizontalAlign="itemsRight" itemsVerticalAlign="itemsCentered">
-                    <j:CheckBox localId="ruleVisibility" text="Show Rule" selected="true"/>
-                    <j:Label text="Slide to fill"/>
-                    <j:HSlider localId="slider" width="200" value="0" minimum="0" maximum="500" valueChange="changeFill(event)"/>
+                    <j:BarSection width="50%">
+                        <j:ToggleButton localId="ruleVisibility" 
+                            outlined="true" emphasis="emphasized"
+                            text="Hide Rule" selectedText="Show Rule" selected="true">
+                            <j:icon>
+                                <js:ToggleFontIcon text="{MaterialIconType.VISIBILITY_OFF}" selectedText="{MaterialIconType.VISIBILITY}" material="true"/>
+                            </j:icon>
+                        </j:ToggleButton>
+					</j:BarSection>
+                    <j:BarSection width="50%" itemsHorizontalAlign="itemsRight">
+                        <j:Label text="Slide to fill"/>
+                        <j:HSlider localId="slider" value="0" minimum="0" maximum="500" valueChange="changeFill(event)"/>
+					</j:BarSection>
                 </j:CardActions>
              </j:Card>
         </j:View>