diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml index e53aa693e1..92f0b1d5be 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml @@ -67,6 +67,8 @@ Item top: parent.top } visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended + + function onModeChanged() { currentModeIndex = PrintSetupSelectorContents.Mode.Custom } } CustomPrintSetup @@ -116,13 +118,20 @@ Item width: parent.width height: UM.Theme.getSize("default_lining").height color: UM.Theme.getColor("lining") + visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom } Item { id: buttonRow property real padding: UM.Theme.getSize("default_margin").width - height: recommendedButton.height + 2 * padding + (draggableArea.visible ? draggableArea.height : 0) + height: { + if (currentModeIndex == PrintSetupSelectorContents.Mode.Custom) + { + return recommendedButton.height + 2 * padding + (draggableArea.visible ? draggableArea.height : 0) + } + return 0 + } anchors { @@ -145,25 +154,6 @@ Item onClicked: currentModeIndex = PrintSetupSelectorContents.Mode.Recommended } - Cura.SecondaryButton - { - id: customSettingsButton - anchors.top: parent.top - anchors.right: parent.right - anchors.margins: UM.Theme.getSize("default_margin").width - leftPadding: UM.Theme.getSize("default_margin").width - rightPadding: UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@button", "Custom") - iconSource: UM.Theme.getIcon("ChevronSingleRight") - isIconOnRightSide: true - visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended - onClicked: - { - currentModeIndex = PrintSetupSelectorContents.Mode.Custom - updateDragPosition(); - } - } - //Invisible area at the bottom with which you can resize the panel. MouseArea { diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml index 5be35f692c..f6edf88495 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml @@ -16,6 +16,8 @@ Item property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1 property real padding: UM.Theme.getSize("default_margin").width + function onModeChanged() {} + ColumnLayout { spacing: UM.Theme.getSize("default_margin").height @@ -79,10 +81,27 @@ Item ColumnLayout { spacing: UM.Theme.getSize("thin_margin").height - UM.Label + + RowLayout { - text: catalog.i18nc("@label", "Recommended print settings") - font: UM.Theme.getFont("medium") + UM.Label + { + text: catalog.i18nc("@label", "Recommended print settings") + font: UM.Theme.getFont("medium") + } + + Item { Layout.fillWidth: true } // Spacer + + Cura.SecondaryButton + { + id: customSettingsButton + anchors.top: parent.top + anchors.right: parent.right + text: catalog.i18nc("@button", "Show Custom") + textFont: UM.Theme.getFont("medium_bold") + outlineColor: "transparent" + onClicked: onModeChanged() + } } RecommendedStrengthSelector