Resolve alignment issues

If the material list is too long the printer name/print button should be aligned to the top according to the figma design

CURA-10507
This commit is contained in:
c.lamboo 2023-05-05 10:43:26 +02:00
parent afed736125
commit 333c573dcc

View file

@ -37,7 +37,7 @@ Rectangle
Layout.preferredWidth: parent.width / 3
Layout.preferredHeight: childrenRect.height
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Layout.alignment: extruders[0].materials.length > 1 ? Qt.AlignTop : Qt.AlignCenter
Layout.fillHeight: false
source: UM.Theme.getIcon("Printer")
@ -52,7 +52,7 @@ Rectangle
Layout.fillWidth: true
Layout.preferredWidth: parent.width / 2
Layout.preferredHeight: childrenRect.height
Layout.alignment: Qt.AlignCenter
Layout.alignment: extruders[0].materials.length > 1 ? Qt.AlignTop : Qt.AlignCenter
spacing: UM.Theme.getSize("narrow_margin").height
Repeater
@ -119,7 +119,7 @@ Rectangle
implicitWidth: UM.Theme.getSize("large_button").width
implicitHeight: implicitWidth
Layout.alignment: Qt.AlignCenter
Layout.alignment: extruders[0].materials.length > 1 ? Qt.AlignTop : Qt.AlignCenter
Layout.preferredHeight: childrenRect.height
padding: 0