From 85f2a7e8f692e5202f4821e25ea9a9a7d79d7501 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 6 Dec 2018 14:04:21 +0100 Subject: [PATCH] Move visible to Rows for extruder configs CURA-5941 So the whole row, such as "material", will be shown/hiden based on whether the machine has materials. --- .../Menus/ConfigurationMenu/CustomConfiguration.qml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 19b7158929..ac40958a29 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -140,6 +140,7 @@ Item Row { height: UM.Theme.getSize("print_setup_item").height + visible: extrudersModel.count > 1 // If there is only one extruder, there is no point to enable/disable that. Label { @@ -149,7 +150,6 @@ Item color: UM.Theme.getColor("text") height: parent.height width: selectors.textWidth - visible: extrudersModel.count > 1 } OldControls.CheckBox @@ -158,7 +158,6 @@ Item enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder. height: UM.Theme.getSize("setting_control").height style: UM.Theme.styles.checkbox - visible: extrudersModel.count > 1 /* Use a MouseArea to process the click on this checkbox. This is necessary because actually clicking the checkbox @@ -177,6 +176,8 @@ Item Row { height: UM.Theme.getSize("print_setup_item").height + visible: Cura.MachineManager.hasMaterials + Label { text: catalog.i18nc("@label", "Material") @@ -185,7 +186,6 @@ Item color: UM.Theme.getColor("text") height: parent.height width: selectors.textWidth - visible: materialSelection.visible } OldControls.ToolButton @@ -197,7 +197,6 @@ Item text: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.material.name : "" tooltip: text - visible: Cura.MachineManager.hasMaterials height: UM.Theme.getSize("setting_control").height width: selectors.controlWidth @@ -214,6 +213,7 @@ Item Row { height: UM.Theme.getSize("print_setup_item").height + visible: Cura.MachineManager.hasVariants Label { @@ -223,15 +223,13 @@ Item color: UM.Theme.getColor("text") height: parent.height width: selectors.textWidth - visible: variantSelection.visible } OldControls.ToolButton { id: variantSelection text: Cura.MachineManager.activeVariantName - tooltip: Cura.MachineManager.activeVariantName; - visible: Cura.MachineManager.hasVariants + tooltip: Cura.MachineManager.activeVariantName height: UM.Theme.getSize("setting_control").height width: selectors.controlWidth