mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -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
|
@ -91,27 +91,27 @@ SettingItem
|
|||
}
|
||||
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
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
|
||||
border.color:
|
||||
{
|
||||
if (!enabled)
|
||||
if(!enabled)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return UM.Theme.getColor("setting_control_border_highlight")
|
||||
|
@ -119,6 +119,30 @@ SettingItem
|
|||
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
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue