From ce7d2c36d0834aed603f1d7dd59439c58d297802 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 6 Nov 2018 16:15:32 +0100 Subject: [PATCH] Fix the width of the slider label when the number of layers was exactly 10, 100, 1000 and so on. The calculation was using the maximumValue that is 9 in case we have 10 layers, since we start counting from 0 but showing from 1. Now it uses maximumValue + 1. --- plugins/SimulationView/SimulationSliderLabel.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SimulationView/SimulationSliderLabel.qml b/plugins/SimulationView/SimulationSliderLabel.qml index b69fede243..06c6a51b44 100644 --- a/plugins/SimulationView/SimulationSliderLabel.qml +++ b/plugins/SimulationView/SimulationSliderLabel.qml @@ -48,7 +48,7 @@ UM.PointingRectangle { horizontalCenter: parent.horizontalCenter } - width: (maximumValue.toString().length + 1) * 10 * screenScaleFactor + width: ((maximumValue + 1).toString().length + 1) * 10 * screenScaleFactor text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array horizontalAlignment: TextInput.AlignRight