From fd026e472f665ea58189055c3ae8b65a16b224bc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 30 Nov 2021 18:08:42 +0100 Subject: [PATCH] Show compatible printers for materials Contributes to issue CURA-8585. --- .../Marketplace/resources/qml/PackageCard.qml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml index 1c4066f64e..25ba92886e 100644 --- a/plugins/Marketplace/resources/qml/PackageCard.qml +++ b/plugins/Marketplace/resources/qml/PackageCard.qml @@ -415,6 +415,40 @@ Rectangle onLinkActivated: UM.UrlUtil.openUrl(link, ["http", "https"]) } + Column //Separate column to have no spacing between compatible printers. + { + id: compatiblePrinterColumn + width: parent.width - parent.padding * 2 + + visible: packageData.packageType === "material" + spacing: 0 + + Label + { + width: parent.width + + text: catalog.i18nc("@header", "Compatible printers") + font: UM.Theme.getFont("medium_bold") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } + + Repeater + { + model: packageData.compatiblePrinters + + Label + { + width: compatiblePrinterColumn.width + + text: modelData + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } + } + } + Cura.SecondaryButton { anchors.horizontalCenter: parent.horizontalCenter