diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-03-13 13:56:58 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-03-13 14:47:35 +0000 |
commit | 7bb9e01bec50cb87f0c4203e8350b69fb3218646 (patch) | |
tree | 56be14cebfca05841c104590a3d5ae4fa4ec02c5 /examples/quickcontrols2/wearable/qml/Navigation | |
parent | 610e34bcaa0de29d38f5fae4d169da7efc79dc5f (diff) |
Wearable: cleanup NavigationPage
Change-Id: I3e6a3ffbcca962602d08aa9effce981396cc3cdb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols2/wearable/qml/Navigation')
-rw-r--r-- | examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml | 15 | ||||
-rw-r--r-- | examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml | 16 |
2 files changed, 12 insertions, 19 deletions
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml b/examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml index 7ecaa417..bdc3e494 100644 --- a/examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml +++ b/examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml @@ -55,25 +55,23 @@ import "navigation.js" as NavigationData Item { Column { anchors.fill: parent + anchors.margins: 2 spacing: 2 Rectangle { - id: titleRowCntr - anchors.horizontalCenter: parent.horizontalCenter width: parent.width - height: 64 + height: titleRow.height color: UIStyle.colorQtGray9 Row { + id: titleRow spacing: 10 anchors.centerIn: parent Image { anchors.verticalCenter: parent.verticalCenter - height: 64 - width: 64 source: "images/route.png" fillMode: Image.PreserveAspectCrop } @@ -95,7 +93,7 @@ Item { id: routeView width: parent.width - height: UIStyle.visibleRectHeight - titleRowCntr.height + height: parent.height - titleRow.height - parent.spacing property var imageList: ["straight.png", "leftturn.png", "rightturn.png", @@ -108,7 +106,10 @@ Item { boundsBehavior: Flickable.StopAtBounds snapMode: ListView.SnapToItem model: routeModel - delegate: RouteElement {} + delegate: RouteElement { + width: routeView.width + height: routeView.height + } } } Component.onCompleted: { diff --git a/examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml b/examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml index f9a2f26b..79928012 100644 --- a/examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml +++ b/examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml @@ -54,31 +54,22 @@ import "../Style" Rectangle { color: UIStyle.colorQtGray8 - width: UIStyle.visibleDiameter - height: UIStyle.visibleRectHeight - titleRowCntr.height - Row { - anchors.centerIn: parent - width: UIStyle.visibleRectWidth - height: parent.height - spacing: 5 + width: parent.width - 80 + anchors.centerIn: parent Image { id: img anchors.verticalCenter: parent.verticalCenter - height: 64 - width: 64 source: "images/" + navImage fillMode: Image.PreserveAspectFit } Column { - height: parent.height + spacing: 5 width: parent.width - img.width - anchors.verticalCenter: parent.verticalCenter - spacing: 5 Text { width: parent.width @@ -89,6 +80,7 @@ Rectangle { padding: 1 color: UIStyle.colorQtGray1 } + Text { width: parent.width wrapMode: Text.WordWrap |