Communicate to PackageCard whether it is a detailed card or not

If it is detailed, it currently hides the short description. That is not quite enough, but we'll expand that behaviour.

Contributes to issue CURA-8565.
This commit is contained in:
Ghostkeeper 2021-11-29 16:38:24 +01:00 committed by Jelle Spijker
parent 76e43759c7
commit 0b1b4ec01b
No known key found for this signature in database
GPG Key ID: 6662DC033BE6B99A
2 changed files with 7 additions and 4 deletions

View File

@ -11,6 +11,7 @@ import Cura 1.6 as Cura
Rectangle
{
property var packageData
property bool expanded: false
height: UM.Theme.getSize("card").height
color: UM.Theme.getColor("main_background")
@ -21,7 +22,7 @@ Rectangle
State
{
name: "Folded"
when: true // TODO
when: !expanded
PropertyChanges
{
target: descriptionArea
@ -30,8 +31,8 @@ Rectangle
},
State
{
name: "Header"
when: false // TODO
name: "Expanded"
when: expanded
PropertyChanges
{
target: descriptionArea

View File

@ -69,7 +69,6 @@ Item
PackageCard
{
packageData: detailPage.packageData
anchors
{
left: parent.left
@ -79,6 +78,9 @@ Item
top: parent.top
topMargin: UM.Theme.getSize("default_margin").height
}
packageData: detailPage.packageData
expanded: true
}
}
}