summaryrefslogtreecommitdiffstats
path: root/basicsuite/ebike-ui/StatsRow.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/StatsRow.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/StatsRow.qml')
-rw-r--r--basicsuite/ebike-ui/StatsRow.qml15
1 files changed, 8 insertions, 7 deletions
diff --git a/basicsuite/ebike-ui/StatsRow.qml b/basicsuite/ebike-ui/StatsRow.qml
index df0f523..fe49d68 100644
--- a/basicsuite/ebike-ui/StatsRow.qml
+++ b/basicsuite/ebike-ui/StatsRow.qml
@@ -43,8 +43,9 @@ Item {
property string leftValue
property string rightTitle
property string rightValue
- height: UILayout.statsHeight
+ height: parent.height / 3
width: parent.width
+ property int rowTextSize: height * 0.5
Text {
text: leftTitle
@@ -55,35 +56,35 @@ Item {
font {
family: "Montserrat, Light"
weight: Font.Light
- pixelSize: UILayout.statsDescriptionTextSize
+ pixelSize: rowTextSize
}
}
Text {
text: leftValue
anchors.right: parent.horizontalCenter
- anchors.rightMargin: UILayout.statsCenterOffset
+ anchors.rightMargin: parent.width * 0.0125
height: parent.height
color: Colors.statsValueText
verticalAlignment: Text.AlignVCenter
font {
family: "Montserrat, Bold"
weight: Font.Bold
- pixelSize: UILayout.statsValueTextSize
+ pixelSize: rowTextSize
}
}
Text {
text: rightTitle
anchors.left: parent.horizontalCenter
- anchors.leftMargin: UILayout.statsCenterOffset
+ anchors.leftMargin: parent.width * 0.0125
height: parent.height
color: Colors.statsDescriptionText
verticalAlignment: Text.AlignVCenter
font {
family: "Montserrat, Light"
weight: Font.Light
- pixelSize: UILayout.statsDescriptionTextSize
+ pixelSize: rowTextSize
}
}
@@ -96,7 +97,7 @@ Item {
font {
family: "Montserrat, Bold"
weight: Font.Bold
- pixelSize: UILayout.statsValueTextSize
+ pixelSize: rowTextSize
}
}
}