summaryrefslogtreecommitdiffstats
path: root/basicsuite/ebike-ui/ModeBox.qml
diff options
context:
space:
mode:
authorJuho Annunen <juho.annunen@qt.io>2018-08-20 12:25:40 +0300
committerJuho Annunen <juho.annunen@qt.io>2018-08-29 07:30:00 +0000
commit09aa32dd522176a9b9762e4d85b3e8c66d4d6be2 (patch)
tree06600dddeb2598e2745f21d52aad73b4ea456990 /basicsuite/ebike-ui/ModeBox.qml
parent1ff81b46a37550bb4430cc032b6d5504525af53f (diff)
Fix some major scaling & font issues on ebike-demo
Task-number: QTBUG-69840 Change-Id: If519ae62a0a73c8dbf2f6f7b9f681bdfdb8b28a0 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'basicsuite/ebike-ui/ModeBox.qml')
-rw-r--r--basicsuite/ebike-ui/ModeBox.qml23
1 files changed, 11 insertions, 12 deletions
diff --git a/basicsuite/ebike-ui/ModeBox.qml b/basicsuite/ebike-ui/ModeBox.qml
index ad4eba7..490bc16 100644
--- a/basicsuite/ebike-ui/ModeBox.qml
+++ b/basicsuite/ebike-ui/ModeBox.qml
@@ -42,22 +42,21 @@ import "./BikeStyle"
// Bottom-right corner, mode
Item {
- width: 320
- height: UILayout.bottomViewHeight
+ width: root.width * 0.425
+ height: root.height * 0.45
Text {
id: sportModeText
anchors {
- baseline: parent.bottom
- baselineOffset: -UILayout.modeBottomOffset
- horizontalCenter: parent.right
- horizontalCenterOffset: -UILayout.naviModeCenterMargin
+ bottom: parent.bottom
+ bottomMargin: parent.height * 0.3
+ left: parent.horizontalCenter
}
color: datastore.mode == DataStore.Sport ? Colors.modeSelected : Colors.modeUnselected
font {
family: "Montserrat, Medium"
weight: Font.Medium
- pixelSize: UILayout.modeTextSize
+ pixelSize: parent.height * 0.1
}
text: qsTr("SPORT")
}
@@ -65,15 +64,15 @@ Item {
Text {
id: cruiseModeText
anchors {
- baseline: sportModeText.baseline
- baselineOffset: -UILayout.modeDistance
+ bottom: sportModeText.top
+ bottomMargin: parent.height * 0.025
horizontalCenter: sportModeText.horizontalCenter
}
color: datastore.mode == DataStore.Cruise ? Colors.modeSelected : Colors.modeUnselected
font {
family: "Montserrat, Medium"
weight: Font.Medium
- pixelSize: UILayout.modeTextSize
+ pixelSize: parent.height * 0.1
}
text: qsTr("CRUISE")
}
@@ -84,7 +83,7 @@ Item {
}
Rectangle {
- width: UILayout.horizontalViewSeparatorWidth
+ width: parent.width * 0.775
height: UILayout.horizontalViewSeparatorHeight
anchors.top: parent.top
anchors.right: parent.right
@@ -93,7 +92,7 @@ Item {
Rectangle {
width: UILayout.verticalViewSeparatorWidth
- height: UILayout.verticalViewSeparatorHeightBottom
+ height: parent.height * 0.475
anchors.bottom: parent.bottom
anchors.left: parent.left
color: Colors.separator