diff --git a/plugins/Marketplace/resources/qml/PackageDetails.qml b/plugins/Marketplace/resources/qml/PackageDetails.qml index 4b4b2123c7..49e4d97633 100644 --- a/plugins/Marketplace/resources/qml/PackageDetails.qml +++ b/plugins/Marketplace/resources/qml/PackageDetails.qml @@ -10,6 +10,9 @@ import UM 1.0 as UM Item { + id: detailPage + property var packageData: packages.selectedPackage + RowLayout { id: header @@ -63,5 +66,10 @@ Item bottom: parent.bottom } color: UM.Theme.getColor("detail_background") + + PackageCard + { + packageData: detailPage.packageData + } } } \ No newline at end of file diff --git a/plugins/Marketplace/resources/qml/Packages.qml b/plugins/Marketplace/resources/qml/Packages.qml index def8d40acb..89254f2526 100644 --- a/plugins/Marketplace/resources/qml/Packages.qml +++ b/plugins/Marketplace/resources/qml/Packages.qml @@ -9,9 +9,10 @@ import UM 1.4 as UM ListView { id: packages + width: parent.width property string pageTitle - width: parent.width + property var selectedPackage clip: true @@ -69,7 +70,8 @@ ListView onClicked: { - contextStack.push(Qt.resolvedUrl("PackageDetails.qml")) + packages.selectedPackage = model.package; + contextStack.push(packageDetailsComponent); } PackageCard @@ -78,6 +80,16 @@ ListView } } + Component + { + id: packageDetailsComponent + + PackageDetails + { + packageData: packages.selectedPackage + } + } + //Wrapper item to add spacing between content and footer. footer: Item {