mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 00:39:01 +08:00
Make add printer component more responsive
For some displays/screen resolutions the cut is expended beyond the borders of the window. By making the component more responsive this should be fixed. CURA-9894
This commit is contained in:
parent
b0160b2d86
commit
9774349cb7
@ -26,6 +26,7 @@ Control
|
|||||||
|
|
||||||
contentItem: ColumnLayout
|
contentItem: ColumnLayout
|
||||||
{
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@ -36,24 +37,33 @@ Control
|
|||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
Image
|
Item
|
||||||
{
|
{
|
||||||
source: UM.Theme.getImage("add_printer")
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 200 * screenScaleFactor
|
Layout.minimumWidth: childrenRect.width
|
||||||
Layout.preferredHeight: 200 * screenScaleFactor
|
Layout.preferredHeight: childrenRect.height
|
||||||
|
|
||||||
|
Image
|
||||||
|
{
|
||||||
|
anchors.right: parent.right
|
||||||
|
source: UM.Theme.getImage("add_printer")
|
||||||
|
Layout.preferredWidth: 200 * screenScaleFactor
|
||||||
|
Layout.preferredHeight: 200 * screenScaleFactor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
font: UM.Theme.getFont("default_bold")
|
font: UM.Theme.getFont("default_bold")
|
||||||
@ -63,12 +73,7 @@ Control
|
|||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
Layout.fillWidth: true
|
||||||
FontMetrics
|
|
||||||
{
|
|
||||||
id: fontMetrics
|
|
||||||
font: UM.Theme.getFont("default")
|
|
||||||
}
|
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: [
|
model: [
|
||||||
@ -79,8 +84,8 @@ Control
|
|||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
font: fontMetrics.font
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: fontMetrics.height
|
wrapMode: Text.WordWrap
|
||||||
text: `${index + 1}. ${modelData}`
|
text: `${index + 1}. ${modelData}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user