diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 0c10d6edde..d80daf23b0 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -24,6 +24,17 @@ SettingItem { return UM.Theme.getColor("setting_control_disabled_border") } + switch(propertyProvider.properties.validationState) + { + case "ValidatorState.Exception": + case "ValidatorState.MinimumError": + case "ValidatorState.MaximumError": + return UM.Theme.getColor("setting_validation_error_border"); + case "ValidatorState.MinimumWarning": + case "ValidatorState.MaximumWarning": + return UM.Theme.getColor("setting_validation_warning_border"); + } + //Validation is OK. if(hovered || input.activeFocus) { return UM.Theme.getColor("setting_control_border_highlight") diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index c8d5b07e03..b0013ca894 100755 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -81,9 +81,17 @@ QtObject { border.width: Theme.getSize("default_lining").width border.color: { - if (control_enabled) + if (control.enabled) { - if (control.hovered) + if (control.valueError) + { + return Theme.getColor("setting_validation_error_border"); + } + else if (control.valueWarning) + { + return Theme.getColor("setting_validation_warning_border"); + } + else if (control.hovered) { return Theme.getColor("setting_control_border_highlight"); }