summaryrefslogtreecommitdiffstats
path: root/basicsuite/ebike-ui/NaviGuide.qml
diff options
context:
space:
mode:
authorMikko Gronoff <mikko.gronoff@qt.io>2018-09-14 10:25:01 +0300
committerMikko Gronoff <mikko.gronoff@qt.io>2018-09-14 10:27:21 +0300
commit97863a4992276a3d1aeb3c1bb9ef5a280a5e8b12 (patch)
treeb38f6f152e7036b91c25834a917e320955660db2 /basicsuite/ebike-ui/NaviGuide.qml
parent8be609623fc646e8d9642fc8481a1b9e59fb8417 (diff)
parentaa8e21cc3f60e54dd9c5d1ec482ca440857568f0 (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/NaviGuide.qml')
-rw-r--r--basicsuite/ebike-ui/NaviGuide.qml46
1 files changed, 24 insertions, 22 deletions
diff --git a/basicsuite/ebike-ui/NaviGuide.qml b/basicsuite/ebike-ui/NaviGuide.qml
index 1ba6f5e..a3c011f 100644
--- a/basicsuite/ebike-ui/NaviGuide.qml
+++ b/basicsuite/ebike-ui/NaviGuide.qml
@@ -44,16 +44,16 @@ Rectangle {
property string distance: "0"
property string unit: "m"
- width: UILayout.naviPageGuideRadius * 2
+ width: root.width * 0.14
height: width
radius: width
color: Colors.naviPageGuideBackground
z: 1
Rectangle {
- width: UILayout.naviPageGuideRadius
+ width: parent.width / 2
height: width
- radius: 10
+ radius: width * 0.1
color: Colors.naviPageGuideBackground
anchors.right: parent.right
anchors.bottom: parent.bottom
@@ -63,49 +63,48 @@ Rectangle {
id: guideArrow
anchors {
top: parent.top
- topMargin: UILayout.naviPageGuideArrowTopMargin
- left: parent.left
- leftMargin: UILayout.naviPageGuideArrowLeftMargin
+ topMargin: parent.height * 0.075
+ horizontalCenter: parent.horizontalCenter
}
source: arrowSource
- width: UILayout.naviPageGuideArrowWidth
- height: UILayout.naviPageGuideArrowHeight
+ width: parent.width * 0.5
+ height: width
}
Text {
id: naviAddressText
anchors {
- baseline: parent.bottom
- baselineOffset: -UILayout.naviPageGuideAddressBaselineMargin
+ top: naviDistance.bottom
+ topMargin: parent.height * 0.025
right: parent.right
- rightMargin: UILayout.naviPageGuideAddressRightMargin
+ rightMargin: parent.width * 0.1
}
- width: 123
+ width: parent.width * 0.725
horizontalAlignment: Text.AlignRight
color: Colors.naviPageGuideAddressColor
font {
family: "Montserrat, Medium"
weight: Font.Medium
- pixelSize: UILayout.naviPageGuideAddressTextSize
+ pixelSize: parent.height * 0.075
}
fontSizeMode: Text.Fit
wrapMode: Text.WordWrap
- minimumPixelSize: 9
+ minimumPixelSize: 5
text: address
}
Text {
id: naviUnit
anchors {
- baseline: naviAddressText.baseline
- baselineOffset: -UILayout.naviPageGuideDistanceBaselineMargin
+ bottom: naviDistance.bottom
right: naviAddressText.right
}
+ verticalAlignment: Text.AlignBottom
color: Colors.naviPageGuideUnitColor
font {
family: "Montserrat, Light"
weight: Font.Light
- pixelSize: UILayout.naviPageGuideUnitTextSize
+ pixelSize: parent.height * 0.125
}
text: datastore.smallUnit
}
@@ -113,26 +112,29 @@ Rectangle {
Text {
id: naviDistance
anchors {
- baseline: naviUnit.baseline
+ top: guideArrow.bottom
right: naviUnit.left
- rightMargin: 10
+ rightMargin: parent.width * 0.05
}
+ verticalAlignment: Text.AlignBottom
color: Colors.naviPageGuideTextColor
font {
family: "Montserrat, Bold"
weight: Font.Bold
- pixelSize: UILayout.naviPageGuideDistanceTextSize
+ pixelSize: parent.height * 0.175
}
text: Math.round(datastore.convertSmallDistance(distance) / 10) * 10
}
Image {
source: "images/navigation_widget_shadow.png"
+ width: parent.width * 1.05
+ height: width
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
- horizontalCenterOffset: 1
- verticalCenterOffset: 1
+ horizontalCenterOffset: parent.width * 0.025
+ verticalCenterOffset: parent.height * 0.025
}
z: -1
}