forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user