Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2019-01-10 18:32:43 +0300
committerJaime van Kessel <nallath@gmail.com>2019-01-10 18:32:43 +0300
commitff79e91686c070c1df206c2dc7f93555f04758fd (patch)
tree66674b75c3b70b98ee9a5ed852325a265c3e4738 /resources
parent614b1000fd8642d77ea38b1f6de21e0d24d1adbe (diff)
Move the additional components for the save button out of the action panel
CURA-6097
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/ActionPanel/OutputProcessWidget.qml50
-rw-r--r--resources/qml/ActionPanel/SliceProcessWidget.qml38
-rw-r--r--resources/qml/Cura.qml34
3 files changed, 43 insertions, 79 deletions
diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml
index 15214f212c..e3b623b675 100644
--- a/resources/qml/ActionPanel/OutputProcessWidget.qml
+++ b/resources/qml/ActionPanel/OutputProcessWidget.qml
@@ -31,6 +31,13 @@ Column
id: information
width: parent.width
height: childrenRect.height
+
+ PrintInformationWidget
+ {
+ id: printInformationPanel
+ visible: !preSlicedData
+ anchors.right: parent.right
+ }
Column
{
@@ -51,14 +58,6 @@ Column
text: preSlicedData ? catalog.i18nc("@label", "No time estimation available") : PrintInformation.currentPrintTime.getDisplayString(UM.DurationFormat.Long)
source: UM.Theme.getIcon("clock")
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
@@ -91,43 +90,8 @@ Column
return totalWeights + "g ยท " + totalLengths.toFixed(2) + "m"
}
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
diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml
index 0f415a6a2d..08966ce82c 100644
--- a/resources/qml/ActionPanel/SliceProcessWidget.qml
+++ b/resources/qml/ActionPanel/SliceProcessWidget.qml
@@ -110,8 +110,7 @@ Column
height: parent.height
- anchors.right: additionalComponents.left
- anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0
+ anchors.right: parent.right
anchors.left: parent.left
text: catalog.i18nc("@button", "Slice")
@@ -128,45 +127,12 @@ Column
height: parent.height
anchors.left: parent.left
- anchors.right: additionalComponents.left
- anchors.rightMargin: additionalComponents.width != 0 ? UM.Theme.getSize("default_margin").width : 0
+ anchors.right: parent.right
text: catalog.i18nc("@button", "Cancel")
enabled: sliceButton.enabled
visible: !sliceButton.visible
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
- }
- }
- }
}
diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml
index 4a031e33fa..f3d2e7295a 100644
--- a/resources/qml/Cura.qml
+++ b/resources/qml/Cura.qml
@@ -248,6 +248,7 @@ UM.MainWindow
Cura.ActionPanelWidget
{
+ id: actionPanelWidget
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
@@ -269,6 +270,39 @@ UM.MainWindow
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
{
// A stage can control this area. If nothing is set, it will therefore show the 3D view.