Fix Display slider (hopefully)

This commit is contained in:
Ly-sec 2025-08-08 14:29:23 +02:00
parent 54b531586a
commit 99420fae93

View file

@ -439,12 +439,14 @@ ColumnLayout {
stepSize: 0.05 stepSize: 0.05
snapAlways: true snapAlways: true
value: parent.currentValue value: parent.currentValue
onValueChanged: { onMoved: {
let overrides = Settings.settings.monitorScaleOverrides || {}; if (isFinite(value)) {
overrides = Object.assign({}, overrides); let overrides = Settings.settings.monitorScaleOverrides || {};
overrides[monitorCard.monitorName] = value; overrides = Object.assign({}, overrides);
Settings.settings.monitorScaleOverrides = overrides; overrides[monitorCard.monitorName] = value;
parent.currentValue = value; Settings.settings.monitorScaleOverrides = overrides;
parent.currentValue = value;
}
} }
} }
Text { text: parent.currentValue.toFixed(2); font.pixelSize: 12 * Theme.scale(screen); color: Theme.textPrimary; width: 36 } Text { text: parent.currentValue.toFixed(2); font.pixelSize: 12 * Theme.scale(screen); color: Theme.textPrimary; width: 36 }