use differentiate icon for Ultimaker controlled material/plugin

Materials can be certified, while plugins can be verified.
Added packageType to the model such that the card knows which icon
to use.

Contributes to CURA-8562
This commit is contained in:
Jelle Spijker 2021-11-18 18:44:55 +01:00
parent 584411e59e
commit eb3083c84d
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
2 changed files with 14 additions and 8 deletions

View file

@ -85,12 +85,12 @@ Rectangle
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").height
enabled: packageData.isVerified
visible: packageData.isVerified
enabled: packageData.isCheckedByUltimaker
visible: packageData.isCheckedByUltimaker
Cura.ToolTip
{
tooltipText: catalog.i18nc("@info", "Verified")
tooltipText: packageData.packageType == "plugin" ? catalog.i18nc("@info", "Verified") : catalog.i18nc("@info", "Ultimaker Certified Materials")
visible: parent.hovered
targetPoint: Qt.point(0, Math.round(parent.y + parent.height / 2))
}
@ -104,7 +104,7 @@ Rectangle
{
anchors.fill: parent
color: UM.Theme.getColor("primary")
source: UM.Theme.getIcon("CheckCircle")
source: packageData.packageType == "plugin" ? UM.Theme.getIcon("CheckCircle") : UM.Theme.getIcon("Certified")
}
}