Add extended description header

Wrapping the whole content so far in another column so that we can have a wider part below, automatically aligned.

Contributes to issue CURA-8565.
This commit is contained in:
Ghostkeeper 2021-11-29 18:26:28 +01:00
parent cfd29b268d
commit 0546f58e57
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -13,7 +13,7 @@ Rectangle
property var packageData
property bool expanded: false
height: UM.Theme.getSize("card").height
height: childrenRect.height
color: UM.Theme.getColor("main_background")
radius: UM.Theme.getSize("default_radius").width
@ -33,6 +33,11 @@ Rectangle
target: downloadCount
visible: false
}
PropertyChanges
{
target: extendedDescription
visible: false
}
},
State
{
@ -48,10 +53,25 @@ Rectangle
target: downloadCount
visible: true
}
PropertyChanges
{
target: extendedDescription
visible: true
}
}
]
// Separate column for icon on the left.
Column
{
width: parent.width
spacing: 0
Item
{
width: parent.width
height: UM.Theme.getSize("card").height
Image
{
id: packageItem
@ -356,6 +376,22 @@ Rectangle
}
}
}
}
Column
{
id: extendedDescription
padding: UM.Theme.getSize("default_margin").width
topPadding: 0
Label
{
text: catalog.i18nc("@header", "Description")
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
}
}
}
FontMetrics
{