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:
authorGhostkeeper <rubend@tutanota.com>2018-11-27 17:01:48 +0300
committerGhostkeeper <rubend@tutanota.com>2018-11-27 17:01:48 +0300
commit289399825b1b2b07312008b1a87747d110195bd8 (patch)
treeb5dd2657d75ecd1dcdb36d42e6b454b0adb85501 /resources/qml/ActionPanel/SliceProcessWidget.qml
parent0a71a9dd3ecd5c16fa82a498698f3e937619b842 (diff)
parente863c34f68b3fbe69218d76b3e6b549362468bf1 (diff)
Merge branch 'ui_rework_4_0' into CURA-5876-Configuration_dropdown
Conflicts: plugins/PrepareStage/PrepareMenu.qml: Git was wrong, this was not really a conflict. resources/qml/ActionButton.qml: With iconSource being modified on ui_rework_4_0 and me modifying the icon to be able to display it on the left hand side. resources/qml/ActionPanel/OutputProcessWidget.qml: Git was wrong, not really a conflict. resources/qml/ActionPanel/SliceProcessWidget.qml: Git was wrong, not really a conflict. resources/qml/ExpandableComponent.qml: Both ui_rework_4_0 and me implemented a border around popups. resources/qml/MainWindow/MainWindowHeader.qml: Git was wrong, not really a conflict. resources/themes/cura-light/theme.json: Theme item was added in a place where I added whitespace.
Diffstat (limited to 'resources/qml/ActionPanel/SliceProcessWidget.qml')
-rw-r--r--resources/qml/ActionPanel/SliceProcessWidget.qml65
1 files changed, 40 insertions, 25 deletions
diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml
index 9ce86463f8..cae598fea6 100644
--- a/resources/qml/ActionPanel/SliceProcessWidget.qml
+++ b/resources/qml/ActionPanel/SliceProcessWidget.qml
@@ -40,9 +40,21 @@ Column
}
}
+ Label
+ {
+ id: autoSlicingLabel
+ width: parent.width
+ visible: prepareButtons.autoSlice && widget.backendState == UM.Backend.Processing
+
+ text: catalog.i18nc("@label:PrintjobStatus", "Auto slicing...")
+ color: UM.Theme.getColor("text")
+ font: UM.Theme.getFont("very_small")
+ renderType: Text.NativeRendering
+ }
+
Cura.IconLabel
{
- id: message
+ id: unableToSliceMessage
width: parent.width
visible: widget.backendState == UM.Backend.Error
@@ -81,37 +93,40 @@ Column
}
}
- Cura.ActionButton
+ Item
{
- id: prepareButton
- width: parent.width
- fixedWidthMode: true
- text:
- {
- if ([UM.Backend.NotStarted, UM.Backend.Error].indexOf(widget.backendState) != -1)
- {
- return catalog.i18nc("@button", "Slice")
- }
- if (autoSlice)
- {
- return catalog.i18nc("@button", "Auto slicing...")
- }
- return catalog.i18nc("@button", "Cancel")
- }
- enabled: !autoSlice && !disabledSlice
-
+ id: prepareButtons
// Get the current value from the preferences
property bool autoSlice: UM.Preferences.getValue("general/auto_slice")
// Disable the slice process when
- property bool disabledSlice: [UM.Backend.Done, UM.Backend.Error].indexOf(widget.backendState) != -1
- disabledColor: disabledSlice ? UM.Theme.getColor("action_button_disabled") : "transparent"
- textDisabledColor: disabledSlice ? UM.Theme.getColor("action_button_disabled_text") : UM.Theme.getColor("primary")
- outlineDisabledColor: disabledSlice ? UM.Theme.getColor("action_button_disabled_border") : "transparent"
+ width: parent.width
+ height: UM.Theme.getSize("action_panel_button").height
+ visible: !autoSlice
+ Cura.PrimaryButton
+ {
+ id: sliceButton
+ fixedWidthMode: true
+ anchors.fill: parent
+ text: catalog.i18nc("@button", "Slice")
+ enabled: widget.backendState != UM.Backend.Error
+ visible: widget.backendState == UM.Backend.NotStarted || widget.backendState == UM.Backend.Error
+ onClicked: sliceOrStopSlicing()
+ }
- onClicked: sliceOrStopSlicing()
+ Cura.SecondaryButton
+ {
+ id: cancelButton
+ fixedWidthMode: true
+ anchors.fill: parent
+ text: catalog.i18nc("@button", "Cancel")
+ enabled: sliceButton.enabled
+ visible: !sliceButton.visible
+ onClicked: sliceOrStopSlicing()
+ }
}
+
// React when the user changes the preference of having the auto slice enabled
Connections
{
@@ -119,7 +134,7 @@ Column
onPreferenceChanged:
{
var autoSlice = UM.Preferences.getValue("general/auto_slice")
- prepareButton.autoSlice = autoSlice
+ prepareButtons.autoSlice = autoSlice
}
}