mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Add shadows to various used actionbuttons
CURA-5959
This commit is contained in:
parent
a71e75508c
commit
3ba4b9fd81
4 changed files with 18 additions and 10 deletions
|
|
@ -93,21 +93,20 @@ Column
|
|||
// 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")
|
||||
}
|
||||
return catalog.i18nc("@button", "Cancel")
|
||||
}
|
||||
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
|
||||
visible: !autoSlice
|
||||
|
||||
color: isSlicing ? UM.Theme.getColor("secondary"): UM.Theme.getColor("primary")
|
||||
textColor: isSlicing ? UM.Theme.getColor("primary"): UM.Theme.getColor("button_text")
|
||||
|
||||
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")
|
||||
shadowColor: isSlicing ? UM.Theme.getColor("secondary_shadow") : enabled ? UM.Theme.getColor("action_button_shadow"): UM.Theme.getColor("action_button_disabled_shadow")
|
||||
|
||||
onClicked: sliceOrStopSlicing()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue