From 7bb9e01bec50cb87f0c4203e8350b69fb3218646 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 13 Mar 2017 13:56:58 +0100 Subject: Wearable: cleanup NavigationPage Change-Id: I3e6a3ffbcca962602d08aa9effce981396cc3cdb Reviewed-by: Mitch Curtis --- .../wearable/qml/Navigation/NavigationPage.qml | 15 ++++++++------- .../wearable/qml/Navigation/RouteElement.qml | 16 ++++------------ 2 files changed, 12 insertions(+), 19 deletions(-) (limited to 'examples') 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 -- cgit v1.2.3