mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-08 09:19:01 +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)
|
||||
{
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user