Fix the location of the simulation slider label

CURA-5829
This commit is contained in:
Jaime van Kessel 2018-10-31 10:30:11 +01:00
parent 3fc399a644
commit 15f586ffae
3 changed files with 11 additions and 11 deletions

View file

@ -28,8 +28,8 @@ Item
property real trackThickness: UM.Theme.getSize("slider_groove").width // width of the slider track property real trackThickness: UM.Theme.getSize("slider_groove").width // width of the slider track
property real trackRadius: trackThickness / 2 property real trackRadius: trackThickness / 2
property color trackColor: UM.Theme.getColor("slider_groove") property color trackColor: UM.Theme.getColor("slider_groove")
property real trackBorderWidth: UM.Theme.getColor("slider_groove_border") property real trackBorderWidth: 1
property color trackBorderColor: "black" property color trackBorderColor: UM.Theme.getColor("slider_groove_border")
// value properties // value properties
property real maximumValue: 100 property real maximumValue: 100
@ -80,7 +80,7 @@ Item
return Math.min(Math.max(value, sliderRoot.minimumValue), sliderRoot.maximumValue) return Math.min(Math.max(value, sliderRoot.minimumValue), sliderRoot.maximumValue)
} }
// slider track // Slider track
Rectangle Rectangle
{ {
id: track id: track
@ -106,7 +106,7 @@ Item
anchors.horizontalCenter: sliderRoot.horizontalCenter anchors.horizontalCenter: sliderRoot.horizontalCenter
visible: sliderRoot.layersVisible visible: sliderRoot.layersVisible
// set the new value when dragging // Set the new value when dragging
function onHandleDragged() function onHandleDragged()
{ {
sliderRoot.manuallyChanged = true sliderRoot.manuallyChanged = true
@ -169,7 +169,7 @@ Item
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
x: parent.x + parent.width + UM.Theme.getSize("default_margin").width x: parent.x + parent.width + UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
target: Qt.point(sliderRoot.width, y + height / 2) target: Qt.point(sliderRoot.width + width, y + height / 2)
visible: sliderRoot.activeHandle == parent visible: sliderRoot.activeHandle == parent
// custom properties // custom properties
@ -275,7 +275,7 @@ Item
id: upperHandleLabel id: upperHandleLabel
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
x: parent.x + parent.width + UM.Theme.getSize("default_margin").width x: parent.x - parent.width - width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
target: Qt.point(sliderRoot.width, y + height / 2) target: Qt.point(sliderRoot.width, y + height / 2)
visible: sliderRoot.activeHandle == parent visible: sliderRoot.activeHandle == parent
@ -385,9 +385,9 @@ Item
id: lowerHandleLabel id: lowerHandleLabel
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
x: parent.x + parent.width + UM.Theme.getSize("default_margin").width x: parent.x - parent.width - width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
target: Qt.point(sliderRoot.width, y + height / 2) target: Qt.point(sliderRoot.width + width, y + height / 2)
visible: sliderRoot.activeHandle == parent visible: sliderRoot.activeHandle == parent
// custom properties // custom properties

View file

@ -135,13 +135,13 @@ Item
} }
else else
{ {
UM.SimulationView.setCurrentLayer(currentLayer+1) UM.SimulationView.setCurrentLayer(currentLayer + 1)
UM.SimulationView.setCurrentPath(0) UM.SimulationView.setCurrentPath(0)
} }
} }
else else
{ {
UM.SimulationView.setCurrentPath(currentPath+1) UM.SimulationView.setCurrentPath(currentPath + 1)
} }
} }
// The status must be set here instead of in the resumeSimulation function otherwise it won't work // The status must be set here instead of in the resumeSimulation function otherwise it won't work

View file

@ -13,7 +13,7 @@ def getMetaData():
return { return {
"view": { "view": {
"name": catalog.i18nc("@item:inlistbox", "Layer view"), "name": catalog.i18nc("@item:inlistbox", "Layer view"),
"weight": 2 "weight": 0
} }
} }