Update src/ui/TextField.cpp

This commit is contained in:
DeepBlueV7.X 2020-11-25 00:10:13 +01:00 committed by GitHub
parent 4e8a2d8c9e
commit ebe0cd79d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,7 +159,7 @@ QColor
TextField::underlineColor() const TextField::underlineColor() const
{ {
if (!underline_color_.isValid()) { if (!underline_color_.isValid()) {
if (TextField::isValid() || !isModified()) if ((hasAcceptableInput() && isValid()) || !isModified())
return QPalette().color(QPalette::Highlight); return QPalette().color(QPalette::Highlight);
else else
return Qt::red; return Qt::red;