Move play button to path slider

This commit is contained in:
fieldOfView 2017-11-20 17:17:16 +01:00
parent 775271faac
commit 1483683992
2 changed files with 8 additions and 8 deletions

View file

@ -472,8 +472,9 @@ Item
PathSlider { PathSlider {
id: pathSlider id: pathSlider
width: parent.width
height: UM.Theme.getSize("slider_handle").width height: UM.Theme.getSize("slider_handle").width
anchors.right: playButton.left
anchors.rightMargin: UM.Theme.getSize("default_margin").width
anchors.left: parent.left anchors.left: parent.left
visible: !UM.SimulationView.compatibilityMode visible: !UM.SimulationView.compatibilityMode
@ -508,8 +509,8 @@ Item
height: UM.Theme.getSize("layerview_menu_size").height height: UM.Theme.getSize("layerview_menu_size").height
anchors { anchors {
top: pathSlider.bottom top: playButton.bottom
topMargin: UM.Theme.getSize("slider_layerview_margin").height topMargin: UM.Theme.getSize("default_margin").height
right: parent.right right: parent.right
rightMargin: UM.Theme.getSize("slider_layerview_margin").width rightMargin: UM.Theme.getSize("slider_layerview_margin").width
} }
@ -546,15 +547,14 @@ Item
// Play simulation button // Play simulation button
Button { Button {
id: playButton id: playButton
implicitWidth: UM.Theme.getSize("button").width * 0.75; implicitWidth: Math.floor(UM.Theme.getSize("button").width * 0.75)
implicitHeight: UM.Theme.getSize("button").height * 0.75; implicitHeight: Math.floor(UM.Theme.getSize("button").height * 0.75)
iconSource: "./resources/simulation_resume.svg" iconSource: "./resources/simulation_resume.svg"
style: UM.Theme.styles.tool_button style: UM.Theme.styles.tool_button
visible: !UM.SimulationView.compatibilityMode visible: !UM.SimulationView.compatibilityMode
anchors { anchors {
horizontalCenter: layerSlider.horizontalCenter horizontalCenter: layerSlider.horizontalCenter
top: layerSlider.bottom verticalCenter: pathSlider.verticalCenter
topMargin: UM.Theme.getSize("slider_layerview_margin").width
} }
property var status: 0 // indicates if it's stopped (0) or playing (1) property var status: 0 // indicates if it's stopped (0) or playing (1)

View file

@ -344,7 +344,7 @@
"slider_handle": [1.0, 1.0], "slider_handle": [1.0, 1.0],
"slider_layerview_size": [1.0, 22.0], "slider_layerview_size": [1.0, 22.0],
"slider_layerview_background": [4.0, 0.0], "slider_layerview_background": [4.0, 0.0],
"slider_layerview_margin": [1.0, 1.0], "slider_layerview_margin": [1.0, 1.5],
"layerview_menu_size": [15, 19.5], "layerview_menu_size": [15, 19.5],
"layerview_menu_size_material_color_mode": [15, 15.5], "layerview_menu_size_material_color_mode": [15, 15.5],