From fe30a3c19e64c2b0f351de6d706557dce540d288 Mon Sep 17 00:00:00 2001 From: casper Date: Thu, 30 Dec 2021 12:24:14 +0100 Subject: Add notification badge for the gear icon in the Market Place CURA 8658 --- plugins/Marketplace/resources/qml/Marketplace.qml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'plugins/Marketplace/resources') diff --git a/plugins/Marketplace/resources/qml/Marketplace.qml b/plugins/Marketplace/resources/qml/Marketplace.qml index 017a9e3dde..27826c15b0 100644 --- a/plugins/Marketplace/resources/qml/Marketplace.qml +++ b/plugins/Marketplace/resources/qml/Marketplace.qml @@ -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 + } + } } } -- cgit v1.2.3