Add notification badge for the gear icon in the Market Place

CURA 8658
This commit is contained in:
casper 2021-12-30 12:24:14 +01:00
parent cf7772a40a
commit fe30a3c19e

View File

@ -159,6 +159,24 @@ Window
{
property string sourcePage: "ManagedPackages.qml"
property bool hasSearch: false
Cura.NotificationIcon
{
anchors
{
top: parent.top
right: parent.right
rightMargin: (-0.5 * width) | 0
topMargin: (-0.5 * height) | 0
}
visible: CuraApplication.getPackageManager().packagesWithUpdate.length > 0
labelText:
{
const itemCount = CuraApplication.getPackageManager().packagesWithUpdate.length
return itemCount > 9 ? "9+" : itemCount
}
}
}
}