mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 10:49:03 +08:00
Add the postProcessing button back next to the slice button
CURA-6043
This commit is contained in:
parent
df23097a99
commit
71632fd098
@ -107,7 +107,13 @@ Column
|
|||||||
{
|
{
|
||||||
id: sliceButton
|
id: sliceButton
|
||||||
fixedWidthMode: true
|
fixedWidthMode: true
|
||||||
anchors.fill: parent
|
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
anchors.right: additionalComponents.left
|
||||||
|
anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0
|
||||||
|
anchors.left: parent.left
|
||||||
|
|
||||||
text: catalog.i18nc("@button", "Slice")
|
text: catalog.i18nc("@button", "Slice")
|
||||||
tooltip: catalog.i18nc("@label", "Start the slicing process")
|
tooltip: catalog.i18nc("@label", "Start the slicing process")
|
||||||
enabled: widget.backendState != UM.Backend.Error
|
enabled: widget.backendState != UM.Backend.Error
|
||||||
@ -119,12 +125,47 @@ Column
|
|||||||
{
|
{
|
||||||
id: cancelButton
|
id: cancelButton
|
||||||
fixedWidthMode: true
|
fixedWidthMode: true
|
||||||
anchors.fill: parent
|
height: parent.height
|
||||||
|
anchors.left: parent.left
|
||||||
|
|
||||||
|
anchors.right: additionalComponents.left
|
||||||
|
anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0
|
||||||
text: catalog.i18nc("@button", "Cancel")
|
text: catalog.i18nc("@button", "Cancel")
|
||||||
enabled: sliceButton.enabled
|
enabled: sliceButton.enabled
|
||||||
visible: !sliceButton.visible
|
visible: !sliceButton.visible
|
||||||
onClicked: sliceOrStopSlicing()
|
onClicked: sliceOrStopSlicing()
|
||||||
}
|
}
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: additionalComponents
|
||||||
|
width: childrenRect.width
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: parent.height
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
id: additionalComponentsRow
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: prepareButtons.addAdditionalComponents("saveButton")
|
||||||
|
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: CuraApplication
|
||||||
|
onAdditionalComponentsChanged: prepareButtons.addAdditionalComponents("saveButton")
|
||||||
|
}
|
||||||
|
|
||||||
|
function addAdditionalComponents (areaId)
|
||||||
|
{
|
||||||
|
if(areaId == "saveButton")
|
||||||
|
{
|
||||||
|
for (var component in CuraApplication.additionalComponents["saveButton"])
|
||||||
|
{
|
||||||
|
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user