From d8e212581b90d4687e6f796fccfda721f1a97958 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 30 Nov 2021 19:11:02 +0100 Subject: [PATCH] Show placeholder texts when compatibility lists are empty When there are no compatible printers, we show that there is no information. After all, all materials should be compatible with some printer. When there are no compatible support materials, we simply show 'None', because a material could be incompatible with all known support material types. Contributes to issue CURA-8585. --- .../Marketplace/resources/qml/PackageCard.qml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml index 9d21551a83..54c1a7efb7 100644 --- a/plugins/Marketplace/resources/qml/PackageCard.qml +++ b/plugins/Marketplace/resources/qml/PackageCard.qml @@ -447,6 +447,17 @@ Rectangle elide: Text.ElideRight } } + + Label + { + width: parent.width + + visible: packageData.compatiblePrinters.length == 0 + text: "(" + catalog.i18nc("@info", "No compatibility information") + ")" + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } } Column @@ -481,6 +492,17 @@ Rectangle elide: Text.ElideRight } } + + Label + { + width: parent.width + + visible: packageData.compatibleSupportMaterials.length == 0 + text: "(" + catalog.i18nc("@info No materials", "None") + ")" + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } } Column