From 6656cd0c36bc687af0f84a7ecc96c015518adada Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 23 Aug 2017 13:26:47 +0200 Subject: [PATCH 1/7] Hide adhesion & support options if they are disabled for the current printer --- resources/qml/SidebarSimple.qml | 94 ++++++++++++++------------------- 1 file changed, 39 insertions(+), 55 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index f988ae0e8b..f3917fb444 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -248,25 +248,30 @@ Item } } - Item + Grid { id: helpersCell anchors.top: infillCellRight.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height * 2 anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.right: parent.right - height: childrenRect.height + anchors.rightMargin: UM.Theme.getSize("default_margin").width + + columns: 2 + columnSpacing: UM.Theme.getSize("default_margin").width + rowSpacing: UM.Theme.getSize("default_lining").height Text { id: enableSupportLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: enableSupportCheckBox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@label", "Generate Support"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); + visible: enableSupportCheckBox.visible + height: enableSupportCheckBox.height + width: base.width * .45 - 3 * UM.Theme.getSize("default_margin").width + text: catalog.i18nc("@label", "Generate Support") + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + verticalAlignment: Text.AlignVCenter } CheckBox @@ -274,14 +279,11 @@ Item id: enableSupportCheckBox property alias _hovered: enableSupportMouseArea.containsMouse - anchors.top: parent.top - anchors.left: enableSupportLabel.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width - - style: UM.Theme.styles.checkbox; + style: UM.Theme.styles.checkbox enabled: base.settingsEnabled + visible: supportEnabled.properties.enabled == "True" - checked: supportEnabled.properties.value == "True"; + checked: supportEnabled.properties.value == "True" MouseArea { @@ -296,7 +298,7 @@ Item } onEntered: { - base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportCheckBox.x, 0), + base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportCheckBox.x - UM.Theme.getSize("default_margin").width, 0), catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")); } onExited: @@ -309,20 +311,20 @@ Item Text { id: supportExtruderLabel - visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: supportExtruderCombobox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@label", "Support Extruder"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); + visible: supportExtruderCombobox.visible + height: supportExtruderCombobox.height + + width: base.width * .45 - 3 * UM.Theme.getSize("default_margin").width + text: catalog.i18nc("@label", "Support Extruder") + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + verticalAlignment: Text.AlignVCenter } ComboBox { id: supportExtruderCombobox - visible: (supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1) + visible: height > 0 model: extruderModel property string color_override: "" // for manually setting values @@ -339,20 +341,6 @@ Item textRole: 'text' // this solves that the combobox isn't populated in the first time Cura is started - anchors.top: enableSupportCheckBox.bottom - anchors.topMargin: - { - if ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) - { - return UM.Theme.getSize("default_margin").height; - } - else - { - return 0; - } - } - anchors.left: supportExtruderLabel.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width width: parent.width * .55 height: { @@ -387,7 +375,7 @@ Item acceptedButtons: Qt.NoButton onEntered: { - base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0), + base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x - UM.Theme.getSize("default_margin").width, 0), catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.")); } onExited: @@ -409,14 +397,14 @@ Item Text { id: adhesionHelperLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.verticalCenter: adhesionCheckBox.verticalCenter - width: parent.width * .45 - 3 * UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@label", "Build Plate Adhesion"); - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("text"); + visible: adhesionCheckBox.visible + height: adhesionCheckBox.height + width: base.width * .45 - 3 * UM.Theme.getSize("default_margin").width + text: catalog.i18nc("@label", "Build Plate Adhesion") + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter } CheckBox @@ -424,14 +412,10 @@ Item id: adhesionCheckBox property alias _hovered: adhesionMouseArea.containsMouse - anchors.top: supportExtruderCombobox.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height * 2 - anchors.left: adhesionHelperLabel.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width - //: Setting enable printing build-plate adhesion helper checkbox style: UM.Theme.styles.checkbox; enabled: base.settingsEnabled + visible: platformAdhesionType.properties.enabled == "True" checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" @@ -459,7 +443,7 @@ Item } onEntered: { - base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x, 0), + base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x - UM.Theme.getSize("default_margin").width, 0), catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards.")); } onExited: @@ -582,7 +566,7 @@ Item containerStackId: Cura.MachineManager.activeMachineId key: "adhesion_type" - watchedProperties: [ "value" ] + watchedProperties: [ "value", "enabled" ] storeIndex: 0 } @@ -592,7 +576,7 @@ Item containerStackId: Cura.MachineManager.activeMachineId key: "support_enable" - watchedProperties: [ "value", "description" ] + watchedProperties: [ "value", "enabled", "description" ] storeIndex: 0 } From 308e1793bcff4afca8b81e3ec88787d8268797f5 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 4 Sep 2017 16:55:36 +0200 Subject: [PATCH 2/7] Fix simple mode adhesion checkbox --- resources/qml/SidebarSimple.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index b8c476e24e..5b65f948a2 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -449,7 +449,7 @@ Item // Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft platformAdhesionType.removeFromContainer(0); adhesionType = platformAdhesionType.properties.value; - if(adhesionType == "skirt") + if(adhesionType == "skirt" || adhesionType == "none") { // If the rest of the stack doesn't prescribe an adhesion-type, default to a brim adhesionType = "brim"; From 98babfade7416abc68b389a9e9b48da2a9bed429 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Mon, 11 Sep 2017 11:11:45 +0200 Subject: [PATCH 3/7] CURA-4284 remove debug logging --- plugins/CuraEngineBackend/StartSliceJob.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 6d06d42007..5a76923f7f 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -354,8 +354,6 @@ class StartSliceJob(Job): setting.value = str(limited_stack.getProperty(key, "value")).encode("utf-8") - Logger.log("d", "key=%s value=%s", key, setting.value) - Job.yieldThread() ## Recursive function to put all settings that require each other for value changes in a list From 0a5744b74be7b77447f65fb0ace2527fbe0c6b71 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 11 Sep 2017 11:21:31 +0200 Subject: [PATCH 4/7] Tweaked the update setting CURA-4301 --- cura/BuildVolume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index ccdc3cea40..dc239c15b8 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -96,7 +96,7 @@ class BuildVolume(SceneNode): self._scene_change_timer.timeout.connect(self._onSceneChangeTimerFinished) self._setting_change_timer = QTimer() - self._setting_change_timer.setInterval(100) + self._setting_change_timer.setInterval(150) self._setting_change_timer.setSingleShot(True) self._setting_change_timer.timeout.connect(self._onSettingChangeTimerFinished) From f4bfa499d4c270fa0599c2b3450378f239463e72 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 11 Sep 2017 11:22:52 +0200 Subject: [PATCH 5/7] Remove debugging line CURA-4284 --- plugins/CuraEngineBackend/StartSliceJob.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 5a76923f7f..7f5311dd44 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -334,8 +334,6 @@ class StartSliceJob(Job): self._addRelations(changed_setting_keys, instance.definition.relations) Job.yieldThread() - Logger.log("d", "changed_setting_keys=%s", changed_setting_keys) - # Ensure that the engine is aware what the build extruder is. if stack.getProperty("machine_extruder_count", "value") > 1: changed_setting_keys.add("extruder_nr") From 08882a3f12627e5db7537ac9db6d608b70e68113 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 11 Sep 2017 11:15:54 +0200 Subject: [PATCH 6/7] Fix LayerView text colour CURA-4212 --- plugins/LayerView/LayerView.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index ff8bfcb988..15ad15e5e7 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -211,7 +211,7 @@ Item { text: model.name elide: Text.ElideRight - color: UM.Theme.getColor("button_text") + color: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default") anchors.verticalCenter: parent.verticalCenter anchors.left: extrudersModelCheckBox.left; @@ -280,7 +280,7 @@ Item text: label font: UM.Theme.getFont("default") elide: Text.ElideRight - color: UM.Theme.getColor("button_text") + color: UM.Theme.getColor("setting_control_text") anchors.verticalCenter: parent.verticalCenter anchors.left: legendModelCheckBox.left; anchors.right: legendModelCheckBox.right; @@ -343,7 +343,7 @@ Item Layout.fillWidth: true Layout.preferredHeight: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height Layout.preferredWidth: UM.Theme.getSize("layerview_row").width - color: UM.Theme.getColor("button_text") + color: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default") } } From 005b43cc5d0c6efbee465ad6817c27b347c8e233 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Mon, 11 Sep 2017 11:35:40 +0200 Subject: [PATCH 7/7] CURA-4148 small fixes for layer view settings panel --- plugins/LayerView/LayerView.qml | 6 +++--- resources/themes/cura-light/theme.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index ff8bfcb988..15ad15e5e7 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -211,7 +211,7 @@ Item { text: model.name elide: Text.ElideRight - color: UM.Theme.getColor("button_text") + color: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default") anchors.verticalCenter: parent.verticalCenter anchors.left: extrudersModelCheckBox.left; @@ -280,7 +280,7 @@ Item text: label font: UM.Theme.getFont("default") elide: Text.ElideRight - color: UM.Theme.getColor("button_text") + color: UM.Theme.getColor("setting_control_text") anchors.verticalCenter: parent.verticalCenter anchors.left: legendModelCheckBox.left; anchors.right: legendModelCheckBox.right; @@ -343,7 +343,7 @@ Item Layout.fillWidth: true Layout.preferredHeight: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height Layout.preferredWidth: UM.Theme.getSize("layerview_row").width - color: UM.Theme.getColor("button_text") + color: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default") } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 46bf343bed..72225b87de 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -340,7 +340,7 @@ "slider_layerview_background": [4.0, 0.0], "slider_layerview_margin": [1.0, 1.0], - "layerview_menu_size": [16.5, 21.0], + "layerview_menu_size": [16.5, 22.0], "layerview_menu_size_compatibility": [22, 23.0], "layerview_legend_size": [1.0, 1.0], "layerview_row": [11.0, 1.5],