Added hide button to per object settings

CURA-1278
This commit is contained in:
Jaime van Kessel 2016-05-31 11:06:26 +02:00
parent 5289d5b4ac
commit 72d7bd5769

View file

@ -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