From 27b4e9a063e07a1b435aa8921d9dbfadc196f9b5 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Tue, 12 Nov 2019 14:55:00 +0100 Subject: [PATCH] Refactor: simplify SimulationSliderLabel width --- plugins/SimulationView/SimulationSliderLabel.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/SimulationView/SimulationSliderLabel.qml b/plugins/SimulationView/SimulationSliderLabel.qml index 5245c5e92a..9b29ae1d02 100644 --- a/plugins/SimulationView/SimulationSliderLabel.qml +++ b/plugins/SimulationView/SimulationSliderLabel.qml @@ -55,6 +55,7 @@ UM.PointingRectangle { alignWhenCentered: false } + width: maxValueMetrics.width + UM.Theme.getSize("default_margin").width text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array horizontalAlignment: TextInput.AlignHCenter @@ -66,8 +67,7 @@ UM.PointingRectangle { textColor: UM.Theme.getColor("text") font: UM.Theme.getFont("default") renderType: Text.NativeRendering - // valueLabel width - background: Item { implicitWidth: maxValueMetrics.width + UM.Theme.getSize("default_margin").width } + background: Item { } } onEditingFinished: {