Last active
December 15, 2015 15:19
-
-
Save josip/5280659 to your computer and use it in GitHub Desktop.
Custom Header and Divider components for BB10 Cascades.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #RimCascadesAssetMetaData version=1.0 | |
| source: "divider.png" | |
| repeatable: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #RimCascadesAssetMetaData version=1.0 | |
| source: "header.png" | |
| repeatable: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bb.cascades 1.0 | |
| Container { | |
| id: root | |
| background: bg.imagePaint | |
| preferredHeight: 32 | |
| layout: StackLayout { orientation: LayoutOrientation.LeftToRight } | |
| attachedObjects: [ | |
| ImagePaintDefinition { | |
| id: bg | |
| repeatPattern: RepeatPattern.X | |
| imageSource: "asset:///images/components/divider.amd" | |
| } | |
| ] | |
| Container { | |
| minHeight: 32 | |
| maxHeight: 32 | |
| preferredHeight: 32 | |
| layoutProperties: StackLayoutProperties { spaceQuota: 1.0 } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bb.cascades 1.0 | |
| Container { | |
| id: root | |
| background: bg.imagePaint | |
| preferredHeight: 32 | |
| layout: StackLayout { orientation: LayoutOrientation.LeftToRight } | |
| property string title: "Header" | |
| attachedObjects: [ | |
| ImagePaintDefinition { | |
| id: bg | |
| repeatPattern: RepeatPattern.X | |
| imageSource: "asset:///images/components/header.amd" | |
| } | |
| ] | |
| Container { | |
| leftPadding: 15 | |
| rightPadding: 15 | |
| layoutProperties: StackLayoutProperties { spaceQuota: 1.0 } | |
| Label { | |
| text: root.title | |
| textStyle.color: Color.White | |
| textStyle.fontSize: FontSize.Small | |
| textStyle.fontWeight: FontWeight.Bold | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

