Add a persistent zoom setting to settings.json

The zoom keybinds now modify this setting directly.
The `uiScale` property in themes now default to using this zoom setting,
since just removing it would need of annoying changes through theme
files and QML code, and is best left to until the future theming
overhaul update.
This commit is contained in:
miruka
2020-09-01 14:19:40 -04:00
parent bd8c6ec0fc
commit 8b37ca2524
5 changed files with 16 additions and 6 deletions

View File

@@ -64,17 +64,26 @@ Item {
HShortcut {
sequences: window.settings.keys.zoomIn
onActivated: theme.uiScale += 0.1
onActivated: {
window.settings.zoom += 0.1
window.settingsChanged()
}
}
HShortcut {
sequences: window.settings.keys.zoomOut
onActivated: theme.uiScale = Math.max(0.1, theme.uiScale - 0.1)
onActivated: {
window.settings.zoom = Math.max(0.1, window.settings.zoom - 0.1)
window.settingsChanged()
}
}
HShortcut {
sequences: window.settings.keys.zoomReset
onActivated: theme.uiScale = 1
onActivated: {
window.settings.zoom = 1
window.settingsChanged()
}
}
HShortcut {