Commit 1acec7ce authored by Alessandro Portale's avatar Alessandro Portale

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: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent 98f7a00e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment