diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2016-07-25 00:47:50 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2016-07-25 11:49:02 +0000 |
commit | 1acec7ceb471759f6ac67db584072f701ce42c2e (patch) | |
tree | 2e839d16fd67d56566b8dc067b59a5522304cea1 | |
parent | 98f7a00e7070c856c4a50a89eab6cb63b299db21 (diff) |
Utils: Get default error color from Theme
The default Qt:red for the lineedit in Utils::PathChooser is unreadable
in dark themes. This change ensures that the color comes from the
current theme.
Change-Id: I7b890bb18e4b996cf0a8f0ac3286da87dd33f5f2
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
-rw-r--r-- | src/libs/utils/pathchooser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index edf0384f2d..0e1d838e3c 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -30,6 +30,7 @@ #include "synchronousprocess.h" #include "hostosinfo.h" +#include "theme/theme.h" #include <QDebug> #include <QFileDialog> @@ -226,6 +227,7 @@ PathChooser::PathChooser(QWidget *parent) : connect(d->m_lineEdit, &QLineEdit::textChanged, this, [this] { emit pathChanged(path()); }); d->m_lineEdit->setMinimumWidth(120); + d->m_lineEdit->setErrorColor(creatorTheme()->color(Theme::TextColorError)); d->m_hLayout->addWidget(d->m_lineEdit); d->m_hLayout->setSizeConstraint(QLayout::SetMinimumSize); |