controlcenter: font slider min-max

This commit is contained in:
ATMDA 2025-11-16 08:56:38 -05:00
parent ce3902d8f3
commit 63d680404f

View file

@ -788,7 +788,7 @@ RowLayout {
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width - Appearance.padding.normal width: parent.width - Appearance.padding.normal
horizontalAlignment: TextInput.AlignHCenter horizontalAlignment: TextInput.AlignHCenter
validator: DoubleValidator { bottom: 0.1; top: 5.0 } validator: DoubleValidator { bottom: 0.7; top: 1.5 }
Component.onCompleted: { Component.onCompleted: {
text = (rootPane.fontSizeScale).toFixed(1); text = (rootPane.fontSizeScale).toFixed(1);
@ -797,7 +797,7 @@ RowLayout {
onTextChanged: { onTextChanged: {
if (activeFocus) { if (activeFocus) {
const val = parseFloat(text); const val = parseFloat(text);
if (!isNaN(val) && val >= 0.1 && val <= 5.0) { if (!isNaN(val) && val >= 0.7 && val <= 1.5) {
rootPane.fontSizeScale = val; rootPane.fontSizeScale = val;
rootPane.saveConfig(); rootPane.saveConfig();
} }
@ -805,7 +805,7 @@ RowLayout {
} }
onEditingFinished: { onEditingFinished: {
const val = parseFloat(text); const val = parseFloat(text);
if (isNaN(val) || val < 0.1 || val > 5.0) { if (isNaN(val) || val < 0.7 || val > 1.5) {
text = (rootPane.fontSizeScale).toFixed(1); text = (rootPane.fontSizeScale).toFixed(1);
} }
} }
@ -825,8 +825,8 @@ RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: Appearance.padding.normal * 3 implicitHeight: Appearance.padding.normal * 3
from: 0.1 from: 0.7
to: 5.0 to: 1.5
value: rootPane.fontSizeScale value: rootPane.fontSizeScale
onMoved: { onMoved: {
rootPane.fontSizeScale = fontSizeSlider.value; rootPane.fontSizeScale = fontSizeSlider.value;