Write out border colour as full-fledged function

This makes it easier to read and to modify this functionality rather than a string of ternary operators. It's about to become more complicated too.

Contributes to issue CURA-4148.
This commit is contained in:
Ghostkeeper 2017-08-21 11:55:47 +02:00
parent 42b8e87d00
commit 226bb7b070
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -66,18 +66,37 @@ QtObject {
else if(control.valueWarning)
{
return Theme.getColor("setting_validation_warning");
} else
}
else
{
return Theme.getColor("setting_control");
}
} else {
}
else
{
return Theme.getColor("setting_control_disabled");
}
}
border.width: Theme.getSize("default_lining").width
border.color: !control.enabled ? Theme.getColor("setting_control_disabled_border") :
control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border")
border.color:
{
if (control_enabled)
{
if (control.hovered)
{
return Theme.getColor("setting_control_border_highlight");
}
else
{
return Theme.getColor("setting_control_border");
}
}
else
{
return Theme.getColor("setting_control_disabled_border");
}
}
UM.RecolorImage {
id: downArrow
anchors.verticalCenter: parent.verticalCenter