mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 08:47:29 +08:00
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:
parent
76e43759c7
commit
0b1b4ec01b
@ -11,6 +11,7 @@ import Cura 1.6 as Cura
|
|||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
property var packageData
|
property var packageData
|
||||||
|
property bool expanded: false
|
||||||
|
|
||||||
height: UM.Theme.getSize("card").height
|
height: UM.Theme.getSize("card").height
|
||||||
color: UM.Theme.getColor("main_background")
|
color: UM.Theme.getColor("main_background")
|
||||||
@ -21,7 +22,7 @@ Rectangle
|
|||||||
State
|
State
|
||||||
{
|
{
|
||||||
name: "Folded"
|
name: "Folded"
|
||||||
when: true // TODO
|
when: !expanded
|
||||||
PropertyChanges
|
PropertyChanges
|
||||||
{
|
{
|
||||||
target: descriptionArea
|
target: descriptionArea
|
||||||
@ -30,8 +31,8 @@ Rectangle
|
|||||||
},
|
},
|
||||||
State
|
State
|
||||||
{
|
{
|
||||||
name: "Header"
|
name: "Expanded"
|
||||||
when: false // TODO
|
when: expanded
|
||||||
PropertyChanges
|
PropertyChanges
|
||||||
{
|
{
|
||||||
target: descriptionArea
|
target: descriptionArea
|
||||||
|
@ -69,7 +69,6 @@ Item
|
|||||||
|
|
||||||
PackageCard
|
PackageCard
|
||||||
{
|
{
|
||||||
packageData: detailPage.packageData
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
@ -79,6 +78,9 @@ Item
|
|||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: UM.Theme.getSize("default_margin").height
|
topMargin: UM.Theme.getSize("default_margin").height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
packageData: detailPage.packageData
|
||||||
|
expanded: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user