From f0966b1c578b8c56ead7baf0aabd098674b415f5 Mon Sep 17 00:00:00 2001 From: jspijker Date: Tue, 8 Nov 2022 18:17:41 +0100 Subject: [PATCH] Don't stretch in height and adhere border to UX design Contributes to CURA-8689 --- .../qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml | 3 +++ resources/qml/WelcomePages/PrinterCard.qml | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml index 0e88e0373f..27da8444bf 100644 --- a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml +++ b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml @@ -50,6 +50,8 @@ Control PrinterCard { id: ultimakerPrinterCard + Layout.alignment: Qt.AlignBottom + borderHeight: thrirdPartyPrinterCard.height onClicked: goToUltimakerPrinter text: catalog.i18nc("@button", "Ultimaker printer") imageSource: UM.Theme.getImage("ultimaker_printer") @@ -58,6 +60,7 @@ Control PrinterCard { id: thrirdPartyPrinterCard + Layout.alignment: Qt.AlignBottom onClicked: goToThirdPartyPrinter text: catalog.i18nc("@button", "Non Ultimaker printer") imageSource: UM.Theme.getImage("third_party_printer") diff --git a/resources/qml/WelcomePages/PrinterCard.qml b/resources/qml/WelcomePages/PrinterCard.qml index 6b0a5bb526..406da371ce 100644 --- a/resources/qml/WelcomePages/PrinterCard.qml +++ b/resources/qml/WelcomePages/PrinterCard.qml @@ -13,6 +13,7 @@ Control id: root property alias text: link_text.text property alias imageSource: image.source + property alias borderHeight: background.height property var onClicked states: @@ -42,7 +43,6 @@ Control onClicked: root.onClicked && root.onClicked() } - topPadding: UM.Theme.getSize("wide_margin").height rightPadding: UM.Theme.getSize("wide_margin").width bottomPadding: UM.Theme.getSize("wide_margin").height leftPadding: UM.Theme.getSize("wide_margin").width @@ -50,7 +50,8 @@ Control background: Rectangle { id: background - anchors.fill: parent + anchors.bottom: column.bottom + height: parent.height border.color: UM.Theme.getColor("primary_button") color: "transparent" border.width: 1 @@ -59,6 +60,7 @@ Control contentItem: ColumnLayout { + id: column spacing: UM.Theme.getSize("wide_margin").height height: childrenRect.height width: childrenRect.width @@ -68,7 +70,6 @@ Control id: image source: imageSource width: 180 * screenScaleFactor - height: 180 * screenScaleFactor sourceSize.width: width sourceSize.height: height }