Commit e9a38fbd authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Fonts KCM] Alter DPI only on explicit user interaction

The settings are loaded after the QML is created, and once it is loaded, it becomes indeterministic which property
(checkbox checked or spinbox value) is re-evaluated first and the Binding ends up resetting the config.

BUG: 405572
FIXED-IN: 5.16.4

Differential Revision: https://phabricator.kde.org/D22397
parent c8b6b7ab
......@@ -214,6 +214,7 @@ KCM.SimpleKCM {
id: dpiCheckBox
checked: kcm.fontAASettings.dpi !== 0
text: i18n("Force font DPI:")
onClicked: kcm.fontAASettings.dpi = (checked ? dpiSpinBox.value : 0)
}
QtControls.SpinBox {
......@@ -221,13 +222,8 @@ KCM.SimpleKCM {
stepSize: 24
editable: true
enabled: dpiCheckBox.checked
value: enabled ? kcm.fontAASettings.dpi : 96
Binding {
target: kcm
property: "fontAASettings.dpi"
value: dpiSpinBox.enabled ? dpiSpinBox.value : 0
}
value: kcm.fontAASettings.dpi !== 0 ? kcm.fontAASettings.dpi : 96
onValueModified: kcm.fontAASettings.dpi = value
to: 1000
from: 1
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment