Show both handle labels instead of the range label

Now that the labels are horizontally centered with the handles,
the range label would overlap the bottom handle. So instead, delete the
range handle and show both other handles instead.

CURA-6854
This commit is contained in:
Nino van Hooff 2019-10-29 14:11:09 +01:00
parent 3db5abbd3a
commit 888c3f51a5

View file

@ -158,21 +158,6 @@ Item
onPressed: sliderRoot.setActiveHandle(rangeHandle) onPressed: sliderRoot.setActiveHandle(rangeHandle)
} }
SimulationSliderLabel
{
id: rangleHandleLabel
y: parent.height / 2
height: sliderRoot.handleSize + UM.Theme.getSize("small_margin").height
anchors.horizontalCenter: parent.horizontalCenter
target: Qt.point(parent.width / 2, y -100)
visible: sliderRoot.activeHandle == parent
// custom properties
maximumValue: sliderRoot.maximumValue
value: sliderRoot.upperValue
busy: UM.SimulationView.busy
setValue: rangeHandle.setValueManually // connect callback functions
}
} }
onHeightChanged : { onHeightChanged : {
@ -279,7 +264,7 @@ Item
anchors.bottomMargin: UM.Theme.getSize("narrow_margin").height anchors.bottomMargin: UM.Theme.getSize("narrow_margin").height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
target: Qt.point(parent.width / 2, parent.top) target: Qt.point(parent.width / 2, parent.top)
visible: sliderRoot.activeHandle == parent visible: sliderRoot.activeHandle == parent || sliderRoot.activeHandle == rangeHandle
// custom properties // custom properties
maximumValue: sliderRoot.maximumValue maximumValue: sliderRoot.maximumValue
@ -389,7 +374,7 @@ Item
anchors.topMargin: UM.Theme.getSize("narrow_margin").height anchors.topMargin: UM.Theme.getSize("narrow_margin").height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
target: Qt.point(parent.width / 2, parent.bottom) target: Qt.point(parent.width / 2, parent.bottom)
visible: sliderRoot.activeHandle == parent visible: sliderRoot.activeHandle == parent || sliderRoot.activeHandle == rangeHandle
// custom properties // custom properties
maximumValue: sliderRoot.maximumValue maximumValue: sliderRoot.maximumValue