From 15f586ffae119c9f2e948ce8718095156f6275e9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 31 Oct 2018 10:30:11 +0100 Subject: [PATCH] Fix the location of the simulation slider label CURA-5829 --- plugins/SimulationView/LayerSlider.qml | 16 ++++++++-------- .../SimulationViewMainComponent.qml | 4 ++-- plugins/SimulationView/__init__.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/SimulationView/LayerSlider.qml b/plugins/SimulationView/LayerSlider.qml index 7a7aaa0649..7916cd62b3 100644 --- a/plugins/SimulationView/LayerSlider.qml +++ b/plugins/SimulationView/LayerSlider.qml @@ -28,8 +28,8 @@ Item property real trackThickness: UM.Theme.getSize("slider_groove").width // width of the slider track property real trackRadius: trackThickness / 2 property color trackColor: UM.Theme.getColor("slider_groove") - property real trackBorderWidth: UM.Theme.getColor("slider_groove_border") - property color trackBorderColor: "black" + property real trackBorderWidth: 1 + property color trackBorderColor: UM.Theme.getColor("slider_groove_border") // value properties property real maximumValue: 100 @@ -80,7 +80,7 @@ Item return Math.min(Math.max(value, sliderRoot.minimumValue), sliderRoot.maximumValue) } - // slider track + // Slider track Rectangle { id: track @@ -106,7 +106,7 @@ Item anchors.horizontalCenter: sliderRoot.horizontalCenter visible: sliderRoot.layersVisible - // set the new value when dragging + // Set the new value when dragging function onHandleDragged() { sliderRoot.manuallyChanged = true @@ -169,7 +169,7 @@ Item height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height x: parent.x + parent.width + UM.Theme.getSize("default_margin").width 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 // custom properties @@ -275,7 +275,7 @@ Item id: upperHandleLabel 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 target: Qt.point(sliderRoot.width, y + height / 2) visible: sliderRoot.activeHandle == parent @@ -385,9 +385,9 @@ Item id: lowerHandleLabel 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 - target: Qt.point(sliderRoot.width, y + height / 2) + target: Qt.point(sliderRoot.width + width, y + height / 2) visible: sliderRoot.activeHandle == parent // custom properties diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml index 2484ec25ba..5c45da6b45 100644 --- a/plugins/SimulationView/SimulationViewMainComponent.qml +++ b/plugins/SimulationView/SimulationViewMainComponent.qml @@ -135,13 +135,13 @@ Item } else { - UM.SimulationView.setCurrentLayer(currentLayer+1) + UM.SimulationView.setCurrentLayer(currentLayer + 1) UM.SimulationView.setCurrentPath(0) } } 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 diff --git a/plugins/SimulationView/__init__.py b/plugins/SimulationView/__init__.py index b12e582441..1efb7fd650 100644 --- a/plugins/SimulationView/__init__.py +++ b/plugins/SimulationView/__init__.py @@ -13,7 +13,7 @@ def getMetaData(): return { "view": { "name": catalog.i18nc("@item:inlistbox", "Layer view"), - "weight": 2 + "weight": 0 } }