mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 22:05:55 +08:00
Move show custom button next to setting section title.
CURA-9793
This commit is contained in:
parent
6338085999
commit
d617566db4
@ -67,6 +67,8 @@ Item
|
|||||||
top: parent.top
|
top: parent.top
|
||||||
}
|
}
|
||||||
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended
|
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Recommended
|
||||||
|
|
||||||
|
function onModeChanged() { currentModeIndex = PrintSetupSelectorContents.Mode.Custom }
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomPrintSetup
|
CustomPrintSetup
|
||||||
@ -116,13 +118,20 @@ Item
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
height: UM.Theme.getSize("default_lining").height
|
height: UM.Theme.getSize("default_lining").height
|
||||||
color: UM.Theme.getColor("lining")
|
color: UM.Theme.getColor("lining")
|
||||||
|
visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: buttonRow
|
id: buttonRow
|
||||||
property real padding: UM.Theme.getSize("default_margin").width
|
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
|
anchors
|
||||||
{
|
{
|
||||||
@ -145,25 +154,6 @@ Item
|
|||||||
onClicked: currentModeIndex = PrintSetupSelectorContents.Mode.Recommended
|
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.
|
//Invisible area at the bottom with which you can resize the panel.
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,8 @@ Item
|
|||||||
property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
|
property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
|
||||||
property real padding: UM.Theme.getSize("default_margin").width
|
property real padding: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
function onModeChanged() {}
|
||||||
|
|
||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
@ -79,12 +81,29 @@ Item
|
|||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
spacing: UM.Theme.getSize("thin_margin").height
|
spacing: UM.Theme.getSize("thin_margin").height
|
||||||
|
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Recommended print settings")
|
text: catalog.i18nc("@label", "Recommended print settings")
|
||||||
font: UM.Theme.getFont("medium")
|
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
|
RecommendedStrengthSelector
|
||||||
{
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
Loading…
x
Reference in New Issue
Block a user