mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-10-04 17:46:31 +08:00
Change card summary information into a column
This is necessary because we can't anchor to the bottom of the card here, and because we want to swap out the description for a download count in the extended detail card. Contributes to issue CURA-8565.
This commit is contained in:
parent
8ecd2f86a4
commit
d7058ef520
@ -57,19 +57,25 @@ Rectangle
|
||||
source: packageData.iconUrl != "" ? packageData.iconUrl : "../images/placeholder.svg"
|
||||
}
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
anchors
|
||||
{
|
||||
left: packageItem.right
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("thick_margin").width
|
||||
top: parent.top
|
||||
topMargin: UM.Theme.getSize("narrow_margin").height
|
||||
}
|
||||
height: packageItem.height + packageItem.anchors.margins * 2
|
||||
|
||||
// Title row.
|
||||
RowLayout
|
||||
{
|
||||
id: titleBar
|
||||
anchors
|
||||
{
|
||||
left: packageItem.right
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
topMargin: UM.Theme.getSize("narrow_margin").height
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
rightMargin:UM.Theme.getSize("thick_margin").width
|
||||
}
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
|
||||
Label
|
||||
{
|
||||
@ -182,21 +188,14 @@ Rectangle
|
||||
}
|
||||
onClicked: Qt.openUrlExternally(packageData.authorInfoUrl)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: descriptionArea
|
||||
height: descriptionLabel.height
|
||||
anchors
|
||||
{
|
||||
top: titleBar.bottom
|
||||
left: packageItem.right
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.fillHeight: true
|
||||
|
||||
Label
|
||||
{
|
||||
id: descriptionLabel
|
||||
@ -242,7 +241,7 @@ Rectangle
|
||||
Cura.TertiaryButton
|
||||
{
|
||||
id: readMoreButton
|
||||
anchors.left: tripleDotLabel.right
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: fontMetrics.height //Height of a single line.
|
||||
|
||||
@ -264,13 +263,9 @@ Rectangle
|
||||
RowLayout
|
||||
{
|
||||
id: authorAndActionButton
|
||||
width: parent.width
|
||||
anchors
|
||||
{
|
||||
bottom: parent.bottom
|
||||
left: packageItem.right
|
||||
margins: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
|
||||
spacing: UM.Theme.getSize("narrow_margin").width
|
||||
|
||||
Label
|
||||
@ -324,6 +319,7 @@ Rectangle
|
||||
visible: false // not functional right now, also only when unfolding and required
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FontMetrics
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user