diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 546b7086e6..54783f02b0 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -181,6 +181,7 @@ Item { onLoaded: { settingLoader.item.showRevertButton = false settingLoader.item.showInheritButton = false + settingLoader.item.showLinkedSettingIcon = false settingLoader.item.doDepthIndentation = false } diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index a7bdabb3c5..1609e30080 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -21,10 +21,12 @@ Item { property var showRevertButton: true property var showInheritButton: true + property var showLinkedSettingIcon: true property var doDepthIndentation: true // Create properties to put property provider stuff in (bindings break in qt 5.5.1 otherwise) property var state: propertyProvider.properties.state + property var settablePerExtruder: propertyProvider.properties.settable_per_extruder property var stackLevels: propertyProvider.stackLevels property var stackLevel: stackLevels[0] @@ -131,6 +133,26 @@ Item { verticalCenter: parent.verticalCenter } + UM.SimpleButton + { + id: linkedSettingIcon; + + visible: base.settablePerExtruder != "True" && base.showLinkedSettingIcon + + height: parent.height; + width: height; + + backgroundColor: UM.Theme.getColor("setting_control"); + hoverBackgroundColor: UM.Theme.getColor("setting_control") + color: UM.Theme.getColor("setting_control_button") + hoverColor: UM.Theme.getColor("setting_control_button") + + iconSource: UM.Theme.getIcon("link") + + onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting is always shared between all extruders. Changing it here will change the value for all extruders")) } + onExited: base.showTooltip(base.tooltipText); + } + UM.SimpleButton { id: revertButton; @@ -231,7 +253,6 @@ Item { onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting is normally calculated, but it currently has an absolute value set.\n\nClick to restore the calculated value.")) } onExited: base.showTooltip(base.tooltipText); } - } Item diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index faa7bf94cb..a2aa5be197 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -95,7 +95,7 @@ ScrollView containerStackId: ExtruderManager.activeExtruderStackId ? ExtruderManager.activeExtruderStackId : Cura.MachineManager.activeMachineId key: model.key ? model.key : "" - watchedProperties: [ "value", "enabled", "state", "validationState" ] + watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder" ] storeIndex: 0 } diff --git a/resources/themes/cura/icons/link.svg b/resources/themes/cura/icons/link.svg new file mode 100644 index 0000000000..7cc2778846 --- /dev/null +++ b/resources/themes/cura/icons/link.svg @@ -0,0 +1,43 @@ + +image/svg+xml \ No newline at end of file diff --git a/resources/themes/cura/icons/reset.svg b/resources/themes/cura/icons/reset.svg index fae303d2a1..4772d446d7 100644 --- a/resources/themes/cura/icons/reset.svg +++ b/resources/themes/cura/icons/reset.svg @@ -27,10369 +27,4 @@ c-1.128,0.65-2.448,0.967-3.679,1.439C-0.113,107.552-0.113,69.744-0.113,31.935z"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -