From 0dcc28032ae6b87edaf924940d911e4b23e2e3ff Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 29 Nov 2021 18:03:42 +0100 Subject: [PATCH] Add download count design to detail card Just the design. The data is just a placeholder so far. Contributes to issue CURA-8565. --- .../Marketplace/resources/qml/PackageCard.qml | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml index 77fd98f031..ef22ff04b8 100644 --- a/plugins/Marketplace/resources/qml/PackageCard.qml +++ b/plugins/Marketplace/resources/qml/PackageCard.qml @@ -25,9 +25,14 @@ Rectangle when: !expanded PropertyChanges { - target: descriptionArea + target: shortDescription visible: true } + PropertyChanges + { + target: downloadCount + visible: false + } }, State { @@ -35,9 +40,14 @@ Rectangle when: expanded PropertyChanges { - target: descriptionArea + target: shortDescription visible: false } + PropertyChanges + { + target: downloadCount + visible: true + } } ] @@ -192,7 +202,7 @@ Rectangle Item { - id: descriptionArea + id: shortDescription Layout.preferredWidth: parent.width Layout.fillHeight: true @@ -259,6 +269,32 @@ Rectangle } } + Row + { + id: downloadCount + Layout.preferredWidth: parent.width + Layout.fillHeight: true + + UM.RecolorImage + { + id: downloadsIcon + width: UM.Theme.getSize("card_tiny_icon").width + height: UM.Theme.getSize("card_tiny_icon").height + + source: UM.Theme.getIcon("Download") + color: UM.Theme.getColor("text") + } + + Label + { + anchors.verticalCenter: downloadsIcon.verticalCenter + + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("default") + text: "123456789" + } + } + // Author and action buttons. RowLayout {