Fix the alignments for the sliders in the simulation view.

Contributes to CURA-5772.
This commit is contained in:
Diego Prado Gesto 2018-10-26 09:52:02 +02:00
parent e64698209c
commit a8531a335d
2 changed files with 21 additions and 14 deletions

View file

@ -167,7 +167,7 @@ Item
id: rangleHandleLabel
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
x: parent.x - width - UM.Theme.getSize("default_margin").width
x: parent.x + parent.width + UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
target: Qt.point(sliderRoot.width, y + height / 2)
visible: sliderRoot.activeHandle == parent
@ -275,7 +275,7 @@ Item
id: upperHandleLabel
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
x: parent.x - width - UM.Theme.getSize("default_margin").width
x: parent.x + parent.width + UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
target: Qt.point(sliderRoot.width, y + height / 2)
visible: sliderRoot.activeHandle == parent
@ -385,7 +385,7 @@ Item
id: lowerHandleLabel
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
x: parent.x - width - UM.Theme.getSize("default_margin").width
x: parent.x + parent.width + UM.Theme.getSize("default_margin").width
anchors.verticalCenter: parent.verticalCenter
target: Qt.point(sliderRoot.width, y + height / 2)
visible: sliderRoot.activeHandle == parent

View file

@ -588,13 +588,14 @@ Item
id: slidersBox
width: parent.width
height: parent.height
visible: UM.SimulationView.layerActivity && CuraApplication.platformActivity
anchors
{
top: parent.bottom
topMargin: UM.Theme.getSize("slider_layerview_margin").height
left: parent.left
top: parent.top
leftMargin: UM.Theme.getSize("slider_layerview_margin").height
left: parent.right
}
PathSlider
@ -602,9 +603,13 @@ Item
id: pathSlider
height: UM.Theme.getSize("slider_handle").width
anchors.left: playButton.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.right: parent.right
anchors
{
verticalCenter: playButton.verticalCenter
left: playButton.right
leftMargin: UM.Theme.getSize("default_margin").width
right: parent.right
}
visible: !UM.SimulationView.compatibilityMode
// custom properties
@ -650,10 +655,11 @@ Item
anchors
{
top: !UM.SimulationView.compatibilityMode ? pathSlider.bottom : parent.top
topMargin: !UM.SimulationView.compatibilityMode ? UM.Theme.getSize("default_margin").height : 0
right: parent.right
rightMargin: UM.Theme.getSize("slider_layerview_margin").width
bottom: !UM.SimulationView.compatibilityMode ? pathSlider.top : parent.bottom
top: parent.top
bottomMargin: !UM.SimulationView.compatibilityMode ? UM.Theme.getSize("default_margin").height : 0
left: parent.left
leftMargin: Math.round(UM.Theme.getSize("slider_layerview_margin").width / 2)
}
// custom properties
@ -704,7 +710,8 @@ Item
visible: !UM.SimulationView.compatibilityMode
anchors
{
verticalCenter: pathSlider.verticalCenter
left: parent.left
bottom: parent.bottom
}
property var status: 0 // indicates if it's stopped (0) or playing (1)