Added close button in right top corner

CURA-5941
This commit is contained in:
Aleksei S 2018-11-23 13:10:48 +01:00
parent 666ed595e5
commit c4d0207cc1

View file

@ -151,7 +151,7 @@ Cura.ExpandableComponent
color: UM.Theme.getColor("text")
height: parent.height
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height
// anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("print_setup_selector_margin").height
}
@ -165,6 +165,37 @@ Cura.ExpandableComponent
}
Button
{
id: closeButton;
width: UM.Theme.getSize("message_close").width;
height: UM.Theme.getSize("message_close").height;
anchors
{
right: parent.right;
rightMargin: UM.Theme.getSize("default_margin").width;
top: parent.top;
topMargin: 10
}
UM.RecolorImage
{
anchors.fill: parent;
sourceSize.width: width
sourceSize.height: width
color: UM.Theme.getColor("message_text")
source: UM.Theme.getIcon("cross1")
}
onClicked: base.model.hideMessage(model.id)
background: Rectangle
{
color: UM.Theme.getColor("message_background")
}
}
}
Rectangle