QML UI: format numbers for Theme info

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-08-15 20:48:23 -07:00
parent 44aaab2611
commit cf4a4dd98b

View file

@ -72,14 +72,14 @@ Kirigami.Page {
text: "FontMetrics pixelSize:" text: "FontMetrics pixelSize:"
} }
Kirigami.Label { Kirigami.Label {
text: fm.height text: Number(fm.height).toFixed(2)
} }
Kirigami.Label { Kirigami.Label {
text: "FontMetrics devicePixelRatio:" text: "FontMetrics devicePixelRatio:"
} }
Kirigami.Label { Kirigami.Label {
text: fm.height / fm.font.pointSize text: Number(fm.height / fm.font.pointSize).toFixed(2)
} }
Kirigami.Label { Kirigami.Label {
@ -100,14 +100,14 @@ Kirigami.Page {
text: "Pixel density:" text: "Pixel density:"
} }
Text { Text {
text: Screen.pixelDensity text: Number(Screen.pixelDensity).toFixed(2)
} }
Kirigami.Label { Kirigami.Label {
text: "Height of default font:" text: "Height of default font:"
} }
Text { Text {
text: font.pixelSize / Screen.pixelDensity + "mm" text: Number(font.pixelSize / Screen.pixelDensity).toFixed(2) + "mm"
} }
Kirigami.Label { Kirigami.Label {