From 3f4d379908add0ec7054eb65e87ae91587ffaebd Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 22 Nov 2018 15:35:40 +0100 Subject: Added shadow to slice button CURA-5959 --- resources/qml/ActionPanel/SliceProcessWidget.qml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'resources/qml/ActionPanel/SliceProcessWidget.qml') diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index 2d4a7b6b89..4f10e6879b 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -87,28 +87,27 @@ Column width: parent.width height: UM.Theme.getSize("action_panel_button").height fixedWidthMode: true + + // 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 + 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 + visible: !autoSlice - // 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" + disabledColor: UM.Theme.getColor("action_button_disabled") + textDisabledColor: UM.Theme.getColor("action_button_disabled_text") + shadowEnabled: true + shadowColor: enabled ? UM.Theme.getColor("action_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow") onClicked: sliceOrStopSlicing() } -- cgit v1.2.3