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