Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorj.delarago <joeydelarago@gmail.com>2022-06-02 18:38:42 +0300
committerj.delarago <joeydelarago@gmail.com>2022-06-02 18:38:50 +0300
commita0fd5afbe78ac6e6d9bee9e668af0295f17fba96 (patch)
treec8f09600cfe63bd39c59235aa2cf00648c53f534 /plugins/Marketplace
parent8fe53163b3263e58d85dd860b37bce7e746dac29 (diff)
Add missing warning badge
CURA-6990
Diffstat (limited to 'plugins/Marketplace')
-rw-r--r--plugins/Marketplace/resources/qml/PackageCardHeader.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/Marketplace/resources/qml/PackageCardHeader.qml b/plugins/Marketplace/resources/qml/PackageCardHeader.qml
index 3e8e0fc26f..c014c00d8d 100644
--- a/plugins/Marketplace/resources/qml/PackageCardHeader.qml
+++ b/plugins/Marketplace/resources/qml/PackageCardHeader.qml
@@ -89,6 +89,31 @@ Item
Layout.preferredWidth: parent.width
Layout.preferredHeight: childrenRect.height
+ UM.ColorImage
+ {
+ id: badge
+
+ width: UM.Theme.getSize("section_icon").width
+ height: UM.Theme.getSize("section_icon").height
+
+ visible: packageData.isMissingPackageInformation
+
+ source: UM.Theme.getIcon("WarningBadge", "low")
+ color: UM.Theme.getColor("warning")
+
+ // Make a themable circle in the background so we can change it in other themes
+ Rectangle
+ {
+ id: iconBackground
+ color: UM.Theme.getColor("warning_badge_background")
+ anchors.centerIn: parent
+ width: parent.width - 1.5 //1.5 pixels smaller, (at least sqrt(2), regardless of screen pixel scale) so that the circle doesn't show up behind the icon due to anti-aliasing.
+ height: parent.height - 1.5
+ radius: width / 2
+ z: parent.z - 1
+ }
+ }
+
UM.Label
{
text: packageData.displayName