mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile-widgets: move font property to themeInterface
Move setting of font properties used throughout to themeInterface. Add new settings "currentScale". The properties are kept in main (subsurfaceTheme) in order not to do a big search/replace. Update settings to use currectScale and signal changes in themeinterface. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a3e3a30b70
commit
2cc215d3f2
4 changed files with 59 additions and 14 deletions
|
@ -315,26 +315,23 @@ Kirigami.ScrollablePage {
|
|||
spacing: Kirigami.Units.largeSpacing
|
||||
SsrfButton {
|
||||
text: qsTr("smaller")
|
||||
enabled: subsurfaceTheme.currentScale !== 0.85
|
||||
enabled: ThemeNew.currentScale !== 0.85
|
||||
onClicked: {
|
||||
PrefDisplay.mobile_scale = 0.85
|
||||
fontMetrics.font.pointSize = themeNew.basePointSize * PrefDisplay.mobile_scale;
|
||||
ThemeNew.currentScale = 0.85
|
||||
}
|
||||
}
|
||||
SsrfButton {
|
||||
text: qsTr("regular")
|
||||
enabled: subsurfaceTheme.currentScale !== 1.0
|
||||
enabled: ThemeNew.currentScale !== 1.0
|
||||
onClicked: {
|
||||
PrefDisplay.mobile_scale = 1.0
|
||||
fontMetrics.font.pointSize = themeNew.basePointSize * PrefDisplay.mobile_scale;
|
||||
ThemeNew.currentScale = 1.0
|
||||
}
|
||||
}
|
||||
SsrfButton {
|
||||
text: qsTr("larger")
|
||||
enabled: subsurfaceTheme.currentScale !== 1.15
|
||||
enabled: ThemeNew.currentScale !== 1.15
|
||||
onClicked: {
|
||||
PrefDisplay.mobile_scale = 1.15
|
||||
fontMetrics.font.pointSize = themeNew.basePointSize * PrefDisplay.mobile_scale;
|
||||
ThemeNew.currentScale = 1.15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue