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:
@@ -285,6 +285,8 @@ class UISettings(JSONDataFile):
|
||||
"ownMessagesOnLeftAboveWidth": 895,
|
||||
"theme": "Midnight.qpl",
|
||||
"writeAliases": {},
|
||||
"zoom": 1.0,
|
||||
|
||||
"media": {
|
||||
"autoLoad": True,
|
||||
"autoPlay": False,
|
||||
|
@@ -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 {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
// Base variables
|
||||
|
||||
real uiScale: 1.0
|
||||
real uiScale: window.settings.zoom
|
||||
|
||||
int minimumSupportedWidth: 240 * uiScale
|
||||
int minimumSupportedHeight: 120 * uiScale
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
// Base variables
|
||||
|
||||
real uiScale: 1.0
|
||||
real uiScale: window.settings.zoom
|
||||
|
||||
int minimumSupportedWidth: 240 * uiScale
|
||||
int minimumSupportedHeight: 120 * uiScale
|
||||
|
Reference in New Issue
Block a user