mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 07:35:59 +08:00
Preheat now shows error color like all other input fields
This commit is contained in:
parent
78141cf330
commit
ccb3f225ff
@ -320,7 +320,17 @@ Column
|
|||||||
Rectangle //Input field for pre-heat temperature.
|
Rectangle //Input field for pre-heat temperature.
|
||||||
{
|
{
|
||||||
id: preheatTemperatureControl
|
id: preheatTemperatureControl
|
||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : UM.Theme.getColor("setting_validation_ok")
|
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error") : UM.Theme.getColor("setting_validation_ok")
|
||||||
|
property var showError:
|
||||||
|
{
|
||||||
|
if(bedTemperature.properties.maximum_value != "None" && bedTemperature.properties.maximum_value < parseInt(preheatTemperatureInput.text))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
enabled:
|
enabled:
|
||||||
{
|
{
|
||||||
if (connectedPrinter == null)
|
if (connectedPrinter == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user