Qt: Don't show text as invalid in disabled widgets

In Interface Toolbar the text widget should not be shown as invalid
when the widget is disabled.

Change-Id: I100a338216b34874064cb9f808a36703157811a4
Reviewed-on: https://code.wireshark.org/review/23549
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2017-09-15 14:12:16 +02:00
parent e7ef19efc0
commit 577671a160
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ void InterfaceToolbarLineEdit::updateStyleSheet(bool is_valid)
"}"
)
.arg(apsz.width() + frameWidth)
.arg(is_valid ? QString("") : ColorUtils::fromColorT(prefs.gui_text_invalid).name());
.arg(is_valid || !isEnabled() ? QString("") : ColorUtils::fromColorT(prefs.gui_text_invalid).name());
setStyleSheet(style_sheet);
}