mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 05:05:55 +08:00
Add package card to detail page
The card has the wrong layout, but it's a start. The data is communicated in any case. Contributes to issue CURA-8565.
This commit is contained in:
parent
5dd2dcce90
commit
d5cfaa1e0a
@ -10,6 +10,9 @@ import UM 1.0 as UM
|
|||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
id: detailPage
|
||||||
|
property var packageData: packages.selectedPackage
|
||||||
|
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
id: header
|
id: header
|
||||||
@ -63,5 +66,10 @@ Item
|
|||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
color: UM.Theme.getColor("detail_background")
|
color: UM.Theme.getColor("detail_background")
|
||||||
|
|
||||||
|
PackageCard
|
||||||
|
{
|
||||||
|
packageData: detailPage.packageData
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,9 +9,10 @@ import UM 1.4 as UM
|
|||||||
ListView
|
ListView
|
||||||
{
|
{
|
||||||
id: packages
|
id: packages
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
property string pageTitle
|
property string pageTitle
|
||||||
width: parent.width
|
property var selectedPackage
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
@ -69,7 +70,8 @@ ListView
|
|||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
contextStack.push(Qt.resolvedUrl("PackageDetails.qml"))
|
packages.selectedPackage = model.package;
|
||||||
|
contextStack.push(packageDetailsComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageCard
|
PackageCard
|
||||||
@ -78,6 +80,16 @@ ListView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component
|
||||||
|
{
|
||||||
|
id: packageDetailsComponent
|
||||||
|
|
||||||
|
PackageDetails
|
||||||
|
{
|
||||||
|
packageData: packages.selectedPackage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Wrapper item to add spacing between content and footer.
|
//Wrapper item to add spacing between content and footer.
|
||||||
footer: Item
|
footer: Item
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user