mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-12 02:49:02 +08:00
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:
parent
42b8e87d00
commit
226bb7b070
@ -66,18 +66,37 @@ QtObject {
|
|||||||
else if(control.valueWarning)
|
else if(control.valueWarning)
|
||||||
{
|
{
|
||||||
return Theme.getColor("setting_validation_warning");
|
return Theme.getColor("setting_validation_warning");
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return Theme.getColor("setting_control");
|
return Theme.getColor("setting_control");
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return Theme.getColor("setting_control_disabled");
|
return Theme.getColor("setting_control_disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
border.width: Theme.getSize("default_lining").width
|
border.width: Theme.getSize("default_lining").width
|
||||||
border.color: !control.enabled ? Theme.getColor("setting_control_disabled_border") :
|
border.color:
|
||||||
control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border")
|
{
|
||||||
|
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 {
|
UM.RecolorImage {
|
||||||
id: downArrow
|
id: downArrow
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user