From b332dd108a202af766e8e6414c55965b892b4af0 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Tue, 25 Sep 2018 13:05:02 +0200 Subject: mobile, QML: scale font from the buttons After the work in the previous commit, it gets very simple to implement font scaling. Just assign a the new desired font scale to the used font metrics. The QML engine does all the work. Signed-off-by: Jan Mulder --- mobile-widgets/qml/Settings.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml index 37c514803..65940cc67 100644 --- a/mobile-widgets/qml/Settings.qml +++ b/mobile-widgets/qml/Settings.qml @@ -262,6 +262,7 @@ Kirigami.ScrollablePage { enabled: PrefDisplay.mobile_scale !== 0.85 onClicked: { PrefDisplay.mobile_scale = 0.85 + fontMetrics.font.pointSize = subsurfaceTheme.basePointSize * PrefDisplay.mobile_scale; } } SsrfButton { @@ -269,6 +270,7 @@ Kirigami.ScrollablePage { enabled: PrefDisplay.mobile_scale !== 1.0 onClicked: { PrefDisplay.mobile_scale = 1.0 + fontMetrics.font.pointSize = subsurfaceTheme.basePointSize * PrefDisplay.mobile_scale; } } SsrfButton { @@ -276,6 +278,7 @@ Kirigami.ScrollablePage { enabled: PrefDisplay.mobile_scale !== 1.15 onClicked: { PrefDisplay.mobile_scale = 1.15 + fontMetrics.font.pointSize = subsurfaceTheme.basePointSize * PrefDisplay.mobile_scale; } } } -- cgit v1.2.3-70-g09d2