mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Add warning state for prime blob and CheckBox
CURA-6414
This commit is contained in:
parent
ccbc00c2ee
commit
960a20652a
2 changed files with 40 additions and 15 deletions
|
@ -4626,7 +4626,8 @@
|
||||||
"default_value": false,
|
"default_value": false,
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true,
|
"settable_per_extruder": true,
|
||||||
"enabled": false
|
"enabled": false,
|
||||||
|
"warning_value": "True if resolveOrValue('print_sequence') == 'one_at_a_time' else None"
|
||||||
},
|
},
|
||||||
"extruder_prime_pos_x":
|
"extruder_prime_pos_x":
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,27 +91,27 @@ SettingItem
|
||||||
}
|
}
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
color:
|
|
||||||
{
|
|
||||||
if (!enabled)
|
|
||||||
{
|
|
||||||
return UM.Theme.getColor("setting_control_disabled")
|
|
||||||
}
|
|
||||||
if (control.containsMouse || control.activeFocus)
|
|
||||||
{
|
|
||||||
return UM.Theme.getColor("setting_control_highlight")
|
|
||||||
}
|
|
||||||
return UM.Theme.getColor("setting_control")
|
|
||||||
}
|
|
||||||
|
|
||||||
radius: UM.Theme.getSize("setting_control_radius").width
|
radius: UM.Theme.getSize("setting_control_radius").width
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
|
|
||||||
border.color:
|
border.color:
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if(!enabled)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("setting_control_disabled_border")
|
return UM.Theme.getColor("setting_control_disabled_border")
|
||||||
}
|
}
|
||||||
|
switch (propertyProvider.properties.validationState)
|
||||||
|
{
|
||||||
|
case "ValidatorState.Invalid":
|
||||||
|
case "ValidatorState.Exception":
|
||||||
|
case "ValidatorState.MinimumError":
|
||||||
|
case "ValidatorState.MaximumError":
|
||||||
|
return UM.Theme.getColor("setting_validation_error");
|
||||||
|
case "ValidatorState.MinimumWarning":
|
||||||
|
case "ValidatorState.MaximumWarning":
|
||||||
|
return UM.Theme.getColor("setting_validation_warning");
|
||||||
|
}
|
||||||
|
// Validation is OK.
|
||||||
if (control.containsMouse || control.activeFocus)
|
if (control.containsMouse || control.activeFocus)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("setting_control_border_highlight")
|
return UM.Theme.getColor("setting_control_border_highlight")
|
||||||
|
@ -119,6 +119,30 @@ SettingItem
|
||||||
return UM.Theme.getColor("setting_control_border")
|
return UM.Theme.getColor("setting_control_border")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
color: {
|
||||||
|
if (!enabled)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("setting_control_disabled")
|
||||||
|
}
|
||||||
|
switch (propertyProvider.properties.validationState)
|
||||||
|
{
|
||||||
|
case "ValidatorState.Invalid":
|
||||||
|
case "ValidatorState.Exception":
|
||||||
|
case "ValidatorState.MinimumError":
|
||||||
|
case "ValidatorState.MaximumError":
|
||||||
|
return UM.Theme.getColor("setting_validation_error_background")
|
||||||
|
case "ValidatorState.MinimumWarning":
|
||||||
|
case "ValidatorState.MaximumWarning":
|
||||||
|
return UM.Theme.getColor("setting_validation_warning_background")
|
||||||
|
}
|
||||||
|
// Validation is OK.
|
||||||
|
if (control.containsMouse || control.activeFocus)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("setting_control_highlight")
|
||||||
|
}
|
||||||
|
return UM.Theme.getColor("setting_control")
|
||||||
|
}
|
||||||
|
|
||||||
UM.RecolorImage
|
UM.RecolorImage
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue