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:
parent
bd8c6ec0fc
commit
8b37ca2524
1
TODO.md
1
TODO.md
|
@ -3,7 +3,6 @@
|
|||
- handle invalid access token
|
||||
- If an account is gone from the user's config, discard UI state last page
|
||||
- room A-Z sorting
|
||||
- move uiScale to settings.json
|
||||
- up/down doesn't work in the middle of a @word for which autocompletion isn't
|
||||
open because no matches
|
||||
- filter > enter > room list is always scrolled to top
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user