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/05/13 14:50:22 UTC

[royale-asjs] 02/10: tour-de-jewel: use HGroup layout to layout content. also use gap instead of custom css

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

commit 07d450c4768cb22136db4e61d5b95422ae9ad390
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu May 7 11:15:16 2020 +0200

    tour-de-jewel: use HGroup layout to layout content. also use gap instead of custom css
---
 .../royale/itemRenderers/AdvancedIconListItemRenderer.mxml |  8 ++++----
 .../main/royale/itemRenderers/IconListItemRenderer.mxml    |  7 ++++---
 .../itemRenderers/NavigationGroupExampleItemRenderer.mxml  | 14 ++++++++------
 .../itemRenderers/NavigationIconLinkItemRenderer.mxml      |  7 ++++---
 4 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/AdvancedIconListItemRenderer.mxml b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/AdvancedIconListItemRenderer.mxml
index 5ce2503..45123c4 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/AdvancedIconListItemRenderer.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/AdvancedIconListItemRenderer.mxml
@@ -85,12 +85,12 @@ limitations under the License.
         <js:ItemRendererDataBinding/>
     </j:beads>
 
-    <js:MaterialIcon text="{iconListItem ? iconListItem.icon : ''}"
-                
+    <j:HGroup gap="8" itemsVerticalAlign="itemsCenter">
+        <js:MaterialIcon text="{iconListItem ? iconListItem.icon : ''}"
                 visible="{iconListItem ? iconListItem.icon != null : false}"
                 className="{colorClass}"
                 click="clickCloseButton()"/>
-
-    <j:Label html="{text}" multiline="true"/>
+        <j:Label html="{text}" multiline="true"/>
+    </j:HGroup>
 
 </j:ListItemRenderer>
diff --git a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/IconListItemRenderer.mxml b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/IconListItemRenderer.mxml
index d22dfc0..a827384 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/IconListItemRenderer.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/IconListItemRenderer.mxml
@@ -60,9 +60,10 @@ limitations under the License.
         <js:ToolTipRemovalWhenItemRemoved tooltip="{tt}"/>
     </j:beads>
 
-    <js:MaterialIcon text="{iconList ? iconList.icon : ''}"  visible="{iconList ? iconList.icon != null : false}" click="clickCloseButton()"/>
-
-    <j:Label html="{text}" multiline="true"/>
+    <j:HGroup gap="8" itemsVerticalAlign="itemsCenter">
+        <js:MaterialIcon text="{iconList.icon}"  visible="{iconList.icon != null}" click="clickCloseButton()"/>
+        <j:Label html="{text}" multiline="true"/>
+    </j:HGroup>
 
 </j:ListItemRenderer>
 
diff --git a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationGroupExampleItemRenderer.mxml b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationGroupExampleItemRenderer.mxml
index 182238e..5041fd2 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationGroupExampleItemRenderer.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationGroupExampleItemRenderer.mxml
@@ -81,12 +81,14 @@ limitations under the License.
         <js:ItemRendererDataBinding />
     </j:beads>
 
-    <js:MaterialIcon text="{navlink ? navlink.icon : ''}"  visible="{navlink ? navlink.icon != null : false}"/>
-
-    <html:Span className="navigation-section-title" text="{text}"/>
-    
-    <js:MaterialIcon text="{open? MaterialIconType.EXPAND_LESS: MaterialIconType.EXPAND_MORE}"  className="hint" 
-                visible="{navlink.subMenu != null}" />
+    <j:HGroup gap="8" itemsVerticalAlign="itemsCenter">
+        <js:MaterialIcon text="{navlink.icon}"  visible="{navlink.icon != null}"/>
+
+        <html:Span className="navigation-section-title" text="{text}"/>
+        
+        <js:MaterialIcon text="{open? MaterialIconType.EXPAND_LESS: MaterialIconType.EXPAND_MORE}"  className="hint" 
+                        visible="{navlink.subMenu != null}" />
+    </j:HGroup>
 
 </j:CollapsibleNavigationSectionRenderer>
 
diff --git a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationIconLinkItemRenderer.mxml b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationIconLinkItemRenderer.mxml
index f9a6644..42aff86 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationIconLinkItemRenderer.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/itemRenderers/NavigationIconLinkItemRenderer.mxml
@@ -39,9 +39,10 @@ limitations under the License.
         <js:ItemRendererDataBinding />
     </j:beads>
 
-    <js:MaterialIcon text="{navlink ? navlink.icon : ''}"  visible="{navlink ? navlink.icon != null : false}"/>
-
-    <html:Span text="{navlink ? navlink.label : ''}"/>
+    <j:HGroup gap="8" itemsVerticalAlign="itemsCenter">
+        <js:MaterialIcon text="{navlink.icon}"  visible="{navlink.icon != null}"/>
+        <html:Span text="{navlink.label}"/>
+    </j:HGroup>
 
 </j:NavigationLinkItemRenderer>