Move show custom button next to setting section title.

CURA-9793
This commit is contained in:
Joey de l'Arago 2022-11-30 15:36:15 +01:00
parent 6338085999
commit d617566db4
2 changed files with 32 additions and 23 deletions

View file

@ -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
{