diff --git a/plugins/SimulationView/SimulationSliderLabel.qml b/plugins/SimulationView/SimulationSliderLabel.qml index 6f7749df63..b3824e5344 100644 --- a/plugins/SimulationView/SimulationSliderLabel.qml +++ b/plugins/SimulationView/SimulationSliderLabel.qml @@ -53,7 +53,7 @@ UM.PointingRectangle { verticalCenter: parent.verticalCenter } - width: 40 * screenScaleFactor + width: maximumValue.toString().length * 10 * screenScaleFactor text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array horizontalAlignment: TextInput.AlignRight @@ -77,11 +77,12 @@ UM.PointingRectangle { if (valueLabel.text != "") { // -startFrom because we need to convert back to an array structure sliderLabelRoot.setValue(parseInt(valueLabel.text) - startFrom) + } } validator: IntValidator { - bottom:startFrom + bottom: startFrom top: sliderLabelRoot.maximumValue + startFrom // +startFrom because maybe we want to start in a different value rather than 0 } }