Added 'dismiss' link and logic for removing the item from the dialog

CURA-7090
This commit is contained in:
Dimitriovski 2020-01-10 16:48:45 +01:00
parent e5f464f7e7
commit c86cc3ae5a
No known key found for this signature in database
GPG key ID: 4E62757E2B0D304D
3 changed files with 47 additions and 3 deletions

View file

@ -104,7 +104,7 @@ UM.Dialog{
{
width: parent.width
property int lineHeight: 60
visible: !model.is_compatible
visible: !model.is_compatible && !model.is_dismissed
height: visible ? (lineHeight + UM.Theme.getSize("default_margin").height) : 0 // We only show the incompatible packages here
Image
{
@ -117,6 +117,7 @@ UM.Dialog{
}
Label
{
id: packageName
text: model.name
font: UM.Theme.getFont("medium_bold")
anchors.left: packageIcon.right
@ -125,6 +126,22 @@ UM.Dialog{
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
Label
{
id: dismissLabel
text: "(Dismiss)"
font: UM.Theme.getFont("small")
anchors.right: parent.right
anchors.verticalCenter: packageIcon.verticalCenter
color: UM.Theme.getColor("text")
MouseArea
{
anchors.fill: parent
onClicked: toolbox.dismissIncompatiblePackage(model.package_id)
}
}
}
}
}