Switch to column layout in RecommendedPrintSetup.qml so that left margins can be put on infill selector and items below it.

Add warning and reset button when custom profile is select and/or settings have been changed

CURA-8849
This commit is contained in:
j.delarago 2022-06-15 10:48:04 +02:00
parent 5fa10b0b8a
commit 8362d4c967
3 changed files with 129 additions and 5 deletions

View file

@ -2,6 +2,7 @@
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
import QtQuick.Layouts 1.1
import UM 1.6 as UM
import Cura 1.6 as Cura
@ -15,7 +16,7 @@ Item
property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
property real padding: UM.Theme.getSize("default_margin").width
Column
ColumnLayout
{
spacing: UM.Theme.getSize("default_margin").height
@ -39,29 +40,37 @@ Item
RecommendedQualityProfileSelector
{
width: parent.width
visible: recommendedResolutionSelector.visible
}
RecommendedResolutionSelector
{
id: recommendedResolutionSelector
Layout.fillWidth: true
width: parent.width
}
UnsupportedProfileIndication
{
width: parent.width
visible: !recommendedResolutionSelector.visible
}
ProfileWarningReset
{
width: parent.width
Layout.fillWidth: true
}
//Line between the sections.
Rectangle
{
width: parent.width
height: UM.Theme.getSize("default_lining").height
Layout.topMargin: UM.Theme.getSize("narrow_margin").height
Layout.bottomMargin: UM.Theme.getSize("narrow_margin").height
Layout.fillWidth: true
color: UM.Theme.getColor("lining")
}
@ -76,6 +85,9 @@ Item
width: parent.width
// TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
Layout.fillWidth: true
Layout.leftMargin: UM.Theme.getSize("default_margin").width
Layout.rightMargin: UM.Theme.getSize("default_margin").width
}
RecommendedSupportSelector
@ -83,6 +95,7 @@ Item
width: parent.width
// TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
Layout.leftMargin: UM.Theme.getSize("default_margin").width
}
RecommendedAdhesionSelector
@ -90,6 +103,7 @@ Item
width: parent.width
// TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
Layout.leftMargin: UM.Theme.getSize("default_margin").width
}
}