mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Move the additional components for the save button out of the action panel
CURA-6097
This commit is contained in:
parent
614b1000fd
commit
ff79e91686
4 changed files with 44 additions and 80 deletions
|
@ -488,7 +488,7 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
objectName: "postProcessingSaveAreaButton"
|
objectName: "postProcessingSaveAreaButton"
|
||||||
visible: activeScriptsList.count > 0
|
visible: activeScriptsList.count > 0
|
||||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
height: UM.Theme.getSize("action_button").height
|
||||||
width: height
|
width: height
|
||||||
tooltip: catalog.i18nc("@info:tooltip", "Change active post-processing scripts")
|
tooltip: catalog.i18nc("@info:tooltip", "Change active post-processing scripts")
|
||||||
onClicked: dialog.show()
|
onClicked: dialog.show()
|
||||||
|
|
|
@ -32,6 +32,13 @@ Column
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
|
PrintInformationWidget
|
||||||
|
{
|
||||||
|
id: printInformationPanel
|
||||||
|
visible: !preSlicedData
|
||||||
|
anchors.right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
id: timeAndCostsInformation
|
id: timeAndCostsInformation
|
||||||
|
@ -51,14 +58,6 @@ Column
|
||||||
text: preSlicedData ? catalog.i18nc("@label", "No time estimation available") : PrintInformation.currentPrintTime.getDisplayString(UM.DurationFormat.Long)
|
text: preSlicedData ? catalog.i18nc("@label", "No time estimation available") : PrintInformation.currentPrintTime.getDisplayString(UM.DurationFormat.Long)
|
||||||
source: UM.Theme.getIcon("clock")
|
source: UM.Theme.getIcon("clock")
|
||||||
font: UM.Theme.getFont("large_bold")
|
font: UM.Theme.getFont("large_bold")
|
||||||
|
|
||||||
PrintInformationWidget
|
|
||||||
{
|
|
||||||
id: printInformationPanel
|
|
||||||
visible: !preSlicedData
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: parent.contentWidth + UM.Theme.getSize("default_margin").width
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.IconWithText
|
Cura.IconWithText
|
||||||
|
@ -91,43 +90,8 @@ Column
|
||||||
return totalWeights + "g · " + totalLengths.toFixed(2) + "m"
|
return totalWeights + "g · " + totalLengths.toFixed(2) + "m"
|
||||||
}
|
}
|
||||||
source: UM.Theme.getIcon("spool")
|
source: UM.Theme.getIcon("spool")
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
id: additionalComponents
|
|
||||||
width: childrenRect.width
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: parent.height
|
|
||||||
Row
|
|
||||||
{
|
|
||||||
id: additionalComponentsRow
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: addAdditionalComponents("saveButton")
|
|
||||||
|
|
||||||
Connections
|
|
||||||
{
|
|
||||||
target: CuraApplication
|
|
||||||
onAdditionalComponentsChanged: addAdditionalComponents("saveButton")
|
|
||||||
}
|
|
||||||
|
|
||||||
function addAdditionalComponents (areaId)
|
|
||||||
{
|
|
||||||
if(areaId == "saveButton")
|
|
||||||
{
|
|
||||||
for (var component in CuraApplication.additionalComponents["saveButton"])
|
|
||||||
{
|
|
||||||
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
|
|
|
@ -110,8 +110,7 @@ Column
|
||||||
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
anchors.right: additionalComponents.left
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
text: catalog.i18nc("@button", "Slice")
|
text: catalog.i18nc("@button", "Slice")
|
||||||
|
@ -128,45 +127,12 @@ Column
|
||||||
height: parent.height
|
height: parent.height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
anchors.right: additionalComponents.left
|
anchors.right: parent.right
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -248,6 +248,7 @@ UM.MainWindow
|
||||||
|
|
||||||
Cura.ActionPanelWidget
|
Cura.ActionPanelWidget
|
||||||
{
|
{
|
||||||
|
id: actionPanelWidget
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
|
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
|
||||||
|
@ -269,6 +270,39 @@ UM.MainWindow
|
||||||
visible: CuraApplication.platformActivity && (main.item == null || !qmlTypeOf(main.item, "QQuickRectangle"))
|
visible: CuraApplication.platformActivity && (main.item == null || !qmlTypeOf(main.item, "QQuickRectangle"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: additionalComponents
|
||||||
|
width: childrenRect.width
|
||||||
|
anchors.right: actionPanelWidget.left
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.bottom: actionPanelWidget.bottom
|
||||||
|
anchors.bottomMargin: UM.Theme.getSize("thick_margin").height * 2
|
||||||
|
visible: actionPanelWidget.visible
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
id: additionalComponentsRow
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: contentItem.addAdditionalComponents()
|
||||||
|
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: CuraApplication
|
||||||
|
onAdditionalComponentsChanged: contentItem.addAdditionalComponents("saveButton")
|
||||||
|
}
|
||||||
|
|
||||||
|
function addAdditionalComponents()
|
||||||
|
{
|
||||||
|
for (var component in CuraApplication.additionalComponents["saveButton"])
|
||||||
|
{
|
||||||
|
CuraApplication.additionalComponents["saveButton"][component].parent = additionalComponentsRow
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loader
|
Loader
|
||||||
{
|
{
|
||||||
// A stage can control this area. If nothing is set, it will therefore show the 3D view.
|
// A stage can control this area. If nothing is set, it will therefore show the 3D view.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue