mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 20:50:37 +08:00
Add notification badge for the gear icon in the Market Place
CURA 8658
This commit is contained in:
parent
cf7772a40a
commit
fe30a3c19e
@ -159,6 +159,24 @@ Window
|
|||||||
{
|
{
|
||||||
property string sourcePage: "ManagedPackages.qml"
|
property string sourcePage: "ManagedPackages.qml"
|
||||||
property bool hasSearch: false
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user