diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-09-25 13:05:02 +0200 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-09-25 16:01:39 +0200 |
commit | b332dd108a202af766e8e6414c55965b892b4af0 (patch) | |
tree | a91afc57844b97bdc4fd8e984cc226d55b25b096 /mobile-widgets/qml | |
parent | c2c751c164f3aca50a41b318e240dbcd0722ac1a (diff) | |
download | subsurface-b332dd108a202af766e8e6414c55965b892b4af0.tar.gz |
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 <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/Settings.qml | 3 |
1 files changed, 3 insertions, 0 deletions
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; } } } |