controlcenter: max padding now 2

This commit is contained in:
ATMDA 2025-11-15 21:05:50 -05:00
parent cc74308800
commit f2e9f60344

View file

@ -912,7 +912,7 @@ RowLayout {
anchors.centerIn: parent
width: parent.width - Appearance.padding.normal
horizontalAlignment: TextInput.AlignHCenter
validator: DoubleValidator { bottom: 0.1; top: 5.0 }
validator: DoubleValidator { bottom: 0.1; top: 2.0 }
Component.onCompleted: {
text = (rootPane.paddingScale).toFixed(1);
@ -921,7 +921,7 @@ RowLayout {
onTextChanged: {
if (activeFocus) {
const val = parseFloat(text);
if (!isNaN(val) && val >= 0.1 && val <= 5.0) {
if (!isNaN(val) && val >= 0.1 && val <= 2.0) {
rootPane.paddingScale = val;
rootPane.saveConfig();
}
@ -929,7 +929,7 @@ RowLayout {
}
onEditingFinished: {
const val = parseFloat(text);
if (isNaN(val) || val < 0.1 || val > 5.0) {
if (isNaN(val) || val < 0.1 || val > 2.0) {
text = (rootPane.paddingScale).toFixed(1);
}
}
@ -950,7 +950,7 @@ RowLayout {
implicitHeight: Appearance.padding.normal * 3
from: 0.1
to: 5.0
to: 2.0
value: rootPane.paddingScale
onMoved: {
rootPane.paddingScale = paddingSlider.value;