mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
c2c751c164
commit
b332dd108a
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue