summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qml/main.qml')
-rw-r--r--mobile-widgets/qml/main.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 1df958302..505ed937b 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -42,6 +42,13 @@ Kirigami.ApplicationWindow {
FontMetrics {
id: fontMetrics
+ Component.onCompleted: {
+ if (Math.round(rootItem.width / Kirigami.Units.gridUnit) < 20) {
+ fontMetrics.font.pointSize = fontMetrics.font.pointSize * 2 / 3
+ Kirigami.Theme.defaultFont.pointSize = fontMetrics.font.pointSize
+ console.log("Reduce font size for narrow screens: " + fontMetrics.font.pointSize)
+ }
+ }
}
visible: false