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/06/23 21:47:26 UTC

[royale-asjs] branch develop updated: tourdejewel: add NumericStepper sizing examples

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 59725e4  tourdejewel: add NumericStepper sizing examples
59725e4 is described below

commit 59725e4a981bedae1bda6a72e5602cfa488c0ede
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Jun 23 23:47:17 2020 +0200

    tourdejewel: add NumericStepper sizing examples
---
 .../src/main/royale/NumericStepperPlayGround.mxml  | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/examples/jewel/TourDeJewel/src/main/royale/NumericStepperPlayGround.mxml b/examples/jewel/TourDeJewel/src/main/royale/NumericStepperPlayGround.mxml
index b49747f..ce20cc8 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/NumericStepperPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/NumericStepperPlayGround.mxml
@@ -67,6 +67,68 @@ limitations under the License.
 				</j:HGroup>
 			</j:Card>
         </j:GridCell>
+
+		<j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
+			<j:Card>
+				<j:CardHeader>
+					<html:H3 text="Sizing" className="secondary-normal"/>
+				</j:CardHeader>
+				<j:CardPrimaryContent>
+					<j:Label multiline="true">
+						<j:html><![CDATA[<p>Following <b>NumericStepper</b> size is not set, so it defaults to 200px.</p>]]></j:html>
+					</j:Label>
+
+					<j:NumericStepper/>
+					
+					<html:Hr width="100%"/>
+
+					<j:Label multiline="true">
+						<j:html><![CDATA[<p>Following <b>NumericStepper</b> size is set to 120 pixels.</p>]]></j:html>
+					</j:Label>
+					<j:NumericStepper width="100"/>
+					
+					<html:Hr width="100%"/>
+
+					<j:Label multiline="true">
+						<j:html><![CDATA[<p>Following <b>NumericStepper</b> size is set to 100%.</p>]]></j:html>
+					</j:Label>
+					<j:NumericStepper width="100%"/>
+
+					<html:Hr width="100%"/>
+
+					<j:Label multiline="true">
+						<j:html><![CDATA[<p>Following <b>NumericStepper</b> size is set to 50%.</p>]]></j:html>
+					</j:Label>
+					<j:NumericStepper width="50%"/>
+
+				</j:CardPrimaryContent>
+			</j:Card>
+		</j:GridCell>
+
+		<j:GridCell desktopNumerator="1" desktopDenominator="2" tabletNumerator="1" tabletDenominator="2" phoneNumerator="1" phoneDenominator="1">
+			<j:Card>
+				<j:CardHeader>
+					<html:H3 text="Resizing" className="secondary-normal"/>
+				</j:CardHeader>
+				<j:CardPrimaryContent>
+					<j:Label multiline="true">
+						<j:html><![CDATA[<p>Following <b>NumericStepper</b> width size is managed by a slider.</p>]]></j:html>
+					</j:Label>
+
+					<j:NumericStepper localId="ns3"/>
+
+				</j:CardPrimaryContent>
+				<j:CardActions itemsVerticalAlign="itemsCenter">
+					<j:beads>
+						<j:VerticalLayout gap="3"/>
+					</j:beads>
+					<j:HGroup gap="3" itemsVerticalAlign="itemsCenter">
+						<j:Label text="width: {ns3.width}px"/>
+						<j:HSlider width="250" value="200" minimum="100" maximum="400" valueChange="ns3.width = event.target.value;"/>
+					</j:HGroup>
+				</j:CardActions>
+			</j:Card>
+		</j:GridCell>
 	</j:Grid>
 
 </c:ExampleAndSourceCodeTabbedSectionContent>