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>2018-11-23 20:07:50 +0300
committerJaime van Kessel <nallath@gmail.com>2018-11-23 20:07:50 +0300
commitb82ea58bc815b28815cd6991230d5a3b4d8ca78d (patch)
tree1c6e58777b1669d7a48b5a9ab52c4a9b96d9abd7 /resources/qml/ActionPanel/SliceProcessWidget.qml
parentaf1ee535788b4d64945ef578bde3764551297ab4 (diff)
Changed all the action buttons to either use primary or secondary button
CURA-5959
Diffstat (limited to 'resources/qml/ActionPanel/SliceProcessWidget.qml')
-rw-r--r--resources/qml/ActionPanel/SliceProcessWidget.qml49
1 files changed, 27 insertions, 22 deletions
diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml
index 9a9f40ffac..199b94ab33 100644
--- a/resources/qml/ActionPanel/SliceProcessWidget.qml
+++ b/resources/qml/ActionPanel/SliceProcessWidget.qml
@@ -81,36 +81,41 @@ Column
}
}
- Cura.ActionButton
- {
- id: prepareButton
- width: parent.width
- height: UM.Theme.getSize("action_panel_button").height
- fixedWidthMode: true
+ Item
+ {
+ 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
- property bool isSlicing: [UM.Backend.NotStarted, UM.Backend.Error].indexOf(widget.backendState) == -1
-
- text: isSlicing ? catalog.i18nc("@button", "Cancel") : catalog.i18nc("@button", "Slice")
-
- enabled: !autoSlice && !disabledSlice
+ 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: !autoSlice && widget.backendState != UM.Backend.Error
+ visible: widget.backendState == UM.Backend.NotStarted || widget.backendState == UM.Backend.Error
+ onClicked: sliceOrStopSlicing()
+ }
- color: isSlicing ? UM.Theme.getColor("secondary"): UM.Theme.getColor("primary")
- textColor: isSlicing ? UM.Theme.getColor("primary"): UM.Theme.getColor("button_text")
- outlineColor: "transparent"
- disabledColor: UM.Theme.getColor("action_button_disabled")
- textDisabledColor: UM.Theme.getColor("action_button_disabled_text")
- shadowEnabled: true
- shadowColor: isSlicing ? UM.Theme.getColor("secondary_shadow") : enabled ? UM.Theme.getColor("action_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
-
- 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
{
@@ -118,7 +123,7 @@ Column
onPreferenceChanged:
{
var autoSlice = UM.Preferences.getValue("general/auto_slice")
- prepareButton.autoSlice = autoSlice
+ prepareButtons.autoSlice = autoSlice
}
}