mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-07 03:39:06 +08:00
Set position and width of card in details page
This means that the card itself shouldn't specify a width. It should get a width from how it's used. Contributes to issue CURA-8565.
This commit is contained in:
parent
5edd830210
commit
0069182c6b
@ -12,7 +12,6 @@ Rectangle
|
||||
{
|
||||
property var packageData
|
||||
|
||||
width: parent ? parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("narrow_margin").width: 0
|
||||
height: UM.Theme.getSize("card").height
|
||||
color: UM.Theme.getColor("main_background")
|
||||
radius: UM.Theme.getSize("default_radius").width
|
||||
|
@ -70,6 +70,15 @@ Item
|
||||
PackageCard
|
||||
{
|
||||
packageData: detailPage.packageData
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
right: parent.right
|
||||
rightMargin: anchors.leftMargin
|
||||
top: parent.top
|
||||
topMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -77,6 +77,7 @@ ListView
|
||||
PackageCard
|
||||
{
|
||||
packageData: model.package
|
||||
width: parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("narrow_margin").width
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user