From 72d7bd57697696540a88287c98c529cec3c6488d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 31 May 2016 11:06:26 +0200 Subject: [PATCH] Added hide button to per object settings CURA-1278 --- .../PerObjectSettingsPanel.qml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 8c39919b13..c68cd88dea 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -75,7 +75,32 @@ Item { return "../../resources/qml/Settings/SettingUnknown.qml" } } + Button + { + width: UM.Theme.getSize("setting").height; + height: UM.Theme.getSize("setting").height; + onClicked: addedSettingsModel.setVisible(model.key, false); + + style: ButtonStyle + { + background: Rectangle + { + color: control.hovered ? control.parent.style.controlHighlightColor : control.parent.style.controlColor; + UM.RecolorImage + { + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width/2 + height: parent.height/2 + sourceSize.width: width + sourceSize.height: width + color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") + source: UM.Theme.getIcon("cross1") + } + } + } + } UM.SettingPropertyProvider { id: provider