diff options
author | Antti Hölttä <AHoelttae@luxoft.com> | 2018-12-18 11:38:37 +0100 |
---|---|---|
committer | Antti Hölttä <AHoelttae@luxoft.com> | 2019-03-18 16:34:23 +0100 |
commit | d40b79cb1d3304f113df3091662760f585ee389e (patch) | |
tree | 70fb2d77ad5bd8026f487cb39322e8c587ca24ee /DemoApplication/pages/Page5.qml | |
parent | fe5883489b5fffc2a833daa4d6a18cef1ac10696 (diff) |
Add more features for the demo app
Add a common cursor indicator item that all navigable items may
use for visualizing the cursor.
Add a cursor navigable delegate.
Make lists more generic by adding a CNItemDelegate.
Add CNFlipButton that has flipping animations when used with
CursorNavigation. Update Page4 with the new button type.
Diffstat (limited to 'DemoApplication/pages/Page5.qml')
-rw-r--r-- | DemoApplication/pages/Page5.qml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/DemoApplication/pages/Page5.qml b/DemoApplication/pages/Page5.qml index 578f1f8..80fba90 100644 --- a/DemoApplication/pages/Page5.qml +++ b/DemoApplication/pages/Page5.qml @@ -111,6 +111,38 @@ Item { anchors.fill: parent spacing: 4 + delegate: CNItemDelegate { + width: listView.width + height: 40 + + contentItem: Item { + width: listView.width + height: 40 + + Row { + width: (parent.width - x) + height: 35 + x: 5 + anchors.verticalCenter: parent.verticalCenter + spacing: 10 + + Rectangle { + width: parent.height + height: parent.height + radius: width/2 + color: colorCode + } + + Text { + height: parent.height + font.bold: true + verticalAlignment: Text.AlignVCenter + text: name + } + } + } + } + model: ListModel { ListElement { name: "Joe"; colorCode: "grey" } ListElement { name: "Hillary"; colorCode: "red" } |