mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:28:59 +08:00
Don't stretch in height and adhere border to UX design
Contributes to CURA-8689
This commit is contained in:
parent
00bdd9d72c
commit
f0966b1c57
@ -50,6 +50,8 @@ Control
|
|||||||
PrinterCard
|
PrinterCard
|
||||||
{
|
{
|
||||||
id: ultimakerPrinterCard
|
id: ultimakerPrinterCard
|
||||||
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
borderHeight: thrirdPartyPrinterCard.height
|
||||||
onClicked: goToUltimakerPrinter
|
onClicked: goToUltimakerPrinter
|
||||||
text: catalog.i18nc("@button", "Ultimaker printer")
|
text: catalog.i18nc("@button", "Ultimaker printer")
|
||||||
imageSource: UM.Theme.getImage("ultimaker_printer")
|
imageSource: UM.Theme.getImage("ultimaker_printer")
|
||||||
@ -58,6 +60,7 @@ Control
|
|||||||
PrinterCard
|
PrinterCard
|
||||||
{
|
{
|
||||||
id: thrirdPartyPrinterCard
|
id: thrirdPartyPrinterCard
|
||||||
|
Layout.alignment: Qt.AlignBottom
|
||||||
onClicked: goToThirdPartyPrinter
|
onClicked: goToThirdPartyPrinter
|
||||||
text: catalog.i18nc("@button", "Non Ultimaker printer")
|
text: catalog.i18nc("@button", "Non Ultimaker printer")
|
||||||
imageSource: UM.Theme.getImage("third_party_printer")
|
imageSource: UM.Theme.getImage("third_party_printer")
|
||||||
|
@ -13,6 +13,7 @@ Control
|
|||||||
id: root
|
id: root
|
||||||
property alias text: link_text.text
|
property alias text: link_text.text
|
||||||
property alias imageSource: image.source
|
property alias imageSource: image.source
|
||||||
|
property alias borderHeight: background.height
|
||||||
property var onClicked
|
property var onClicked
|
||||||
|
|
||||||
states:
|
states:
|
||||||
@ -42,7 +43,6 @@ Control
|
|||||||
onClicked: root.onClicked && root.onClicked()
|
onClicked: root.onClicked && root.onClicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
topPadding: UM.Theme.getSize("wide_margin").height
|
|
||||||
rightPadding: UM.Theme.getSize("wide_margin").width
|
rightPadding: UM.Theme.getSize("wide_margin").width
|
||||||
bottomPadding: UM.Theme.getSize("wide_margin").height
|
bottomPadding: UM.Theme.getSize("wide_margin").height
|
||||||
leftPadding: UM.Theme.getSize("wide_margin").width
|
leftPadding: UM.Theme.getSize("wide_margin").width
|
||||||
@ -50,7 +50,8 @@ Control
|
|||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
id: background
|
id: background
|
||||||
anchors.fill: parent
|
anchors.bottom: column.bottom
|
||||||
|
height: parent.height
|
||||||
border.color: UM.Theme.getColor("primary_button")
|
border.color: UM.Theme.getColor("primary_button")
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
@ -59,6 +60,7 @@ Control
|
|||||||
|
|
||||||
contentItem: ColumnLayout
|
contentItem: ColumnLayout
|
||||||
{
|
{
|
||||||
|
id: column
|
||||||
spacing: UM.Theme.getSize("wide_margin").height
|
spacing: UM.Theme.getSize("wide_margin").height
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
@ -68,7 +70,6 @@ Control
|
|||||||
id: image
|
id: image
|
||||||
source: imageSource
|
source: imageSource
|
||||||
width: 180 * screenScaleFactor
|
width: 180 * screenScaleFactor
|
||||||
height: 180 * screenScaleFactor
|
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user