mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-07 03:29:00 +08:00
Tweak the colors of the disabled state.
Contributes to CURA-5786.
This commit is contained in:
parent
45af4eec90
commit
00d75cd4d6
@ -108,27 +108,24 @@ Column
|
||||
height: UM.Theme.getSize("action_panel_button").height
|
||||
text:
|
||||
{
|
||||
if ([1, 4, 5].indexOf(widget.backendState) != -1) // == BackendState.NotStarted or BackendState.Error or BackendState.Disabled
|
||||
{
|
||||
return catalog.i18nc("@button", "Slice")
|
||||
}
|
||||
if (autoSlice)
|
||||
{
|
||||
return catalog.i18nc("@button", "Auto slicing...")
|
||||
}
|
||||
else if ([1, 5].indexOf(widget.backendState) != -1) // == BackendState.NotStarted or BackendState.Disabled
|
||||
{
|
||||
return catalog.i18nc("@button", "Slice")
|
||||
}
|
||||
else
|
||||
{
|
||||
return catalog.i18nc("@button", "Cancel")
|
||||
}
|
||||
return catalog.i18nc("@button", "Cancel")
|
||||
}
|
||||
enabled: !autoSlice
|
||||
enabled: !autoSlice && ([1, 2].indexOf(widget.backendState) != -1)
|
||||
|
||||
// Get the current value from the preferences
|
||||
property bool autoSlice: UM.Preferences.getValue("general/auto_slice")
|
||||
|
||||
disabledColor: "transparent"
|
||||
textDisabledColor: UM.Theme.getColor("primary")
|
||||
outlineDisabledColor: "transparent"
|
||||
disabledColor: ([1, 2].indexOf(widget.backendState) == -1) ? UM.Theme.getColor("action_button_disabled") : "transparent"
|
||||
textDisabledColor: ([1, 2].indexOf(widget.backendState) == -1) ? UM.Theme.getColor("action_button_disabled_text") : UM.Theme.getColor("primary")
|
||||
outlineDisabledColor: ([1, 2].indexOf(widget.backendState) == -1) ? UM.Theme.getColor("action_button_disabled_border") : "transparent"
|
||||
|
||||
onClicked: sliceOrStopSlicing()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user