diff options
author | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-09-14 10:25:01 +0300 |
---|---|---|
committer | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-09-14 10:27:21 +0300 |
commit | 97863a4992276a3d1aeb3c1bb9ef5a280a5e8b12 (patch) | |
tree | b38f6f152e7036b91c25834a917e320955660db2 /basicsuite/ebike-ui/NaviBox.qml | |
parent | 8be609623fc646e8d9642fc8481a1b9e59fb8417 (diff) | |
parent | aa8e21cc3f60e54dd9c5d1ec482ca440857568f0 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
* origin/5.11:
aa8e21c Add new Qt3D demo
ca03367 Exclude demos from colibri imx6ull
a5345fd qtwebbrowser: merge changes from qtwebbrowser git repo
d7e9731 do not enable highdpiscaling on emulator
f730907 Fix mediaplayer default video path
09aa32d Fix some major scaling & font issues on ebike-demo
Change-Id: I044c29ea2908a6254f32b0623037ea63f23d25cb
Diffstat (limited to 'basicsuite/ebike-ui/NaviBox.qml')
-rw-r--r-- | basicsuite/ebike-ui/NaviBox.qml | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/basicsuite/ebike-ui/NaviBox.qml b/basicsuite/ebike-ui/NaviBox.qml index 53b55c8..9a97cf8 100644 --- a/basicsuite/ebike-ui/NaviBox.qml +++ b/basicsuite/ebike-ui/NaviBox.qml @@ -41,22 +41,23 @@ import "./BikeStyle" // Top-right corner, navi Item { - width: 320 - height: UILayout.topViewHeight + id: rootItem + width: root.width * 0.425 + height: root.height * 0.45 property string arrowSource: "images/nav_right.png" property string distance: "0" property string unit: "m" + property real imageMargin: Math.min(width, height) * 0.275 Image { id: naviIcon - width: UILayout.naviIconWidth - height: UILayout.naviIconHeight + width: Math.min(parent.width, parent.height) * 0.375 + height: width source: arrowSource anchors { top: parent.top - topMargin: UILayout.naviIconTop - horizontalCenter: parent.right - horizontalCenterOffset: -UILayout.naviModeCenterMargin + topMargin: imageMargin + left: parent.horizontalCenter } } @@ -75,7 +76,7 @@ Item { font { family: "Montserrat, Bold" weight: Font.Bold - pixelSize: UILayout.naviTextSize + pixelSize: rootItem.height * 0.1 } text: Math.round(datastore.convertSmallDistance(distance) / 10) * 10 } @@ -91,7 +92,7 @@ Item { font { family: "Montserrat, Light" weight: Font.Light - pixelSize: UILayout.naviTextSize + pixelSize: rootItem.height * 0.1 } text: datastore.smallUnit } @@ -106,13 +107,13 @@ Item { font { family: "Montserrat, Medium" weight: Font.Medium - pixelSize: UILayout.modeTextSize + pixelSize: rootItem.height * 0.1 } text: qsTr("NAVIGATE") } Rectangle { - width: UILayout.horizontalViewSeparatorWidth + width: parent.width * 0.775 height: UILayout.horizontalViewSeparatorHeight anchors.bottom: parent.bottom anchors.right: parent.right @@ -121,7 +122,7 @@ Item { Rectangle { width: UILayout.verticalViewSeparatorWidth - height: UILayout.verticalViewSeparatorHeightTop + height: parent.height * 0.475 anchors.top: parent.top anchors.left: parent.left color: Colors.separator |