Browse Source

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
c.lamboo 1 year ago
parent
commit
333c573dcc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      resources/qml/PrinterSelector/PrintSelectorCard.qml

+ 3 - 3
resources/qml/PrinterSelector/PrintSelectorCard.qml

@@ -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