aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/customparserconfigdialog.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2020-01-22 18:20:10 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2020-01-23 07:56:22 +0000
commitedd9d620b02fdb853db382a20c3fd34f7250ad3a (patch)
tree5ef362570d27aef4237707262d2eb3ab704e9bd3 /src/plugins/projectexplorer/customparserconfigdialog.cpp
parent164e6f4b9a7b6b26651cac0e610b4d8f004f59fb (diff)
ProjectExplorer: Use themed colors in CustomParserConfigDialog
Otherwise the text is unreadable in dark themes. Change-Id: Ib5db499f51155b17dc0a3b142dbc189c31cf4df2 Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/plugins/projectexplorer/customparserconfigdialog.cpp')
-rw-r--r--src/plugins/projectexplorer/customparserconfigdialog.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/customparserconfigdialog.cpp b/src/plugins/projectexplorer/customparserconfigdialog.cpp
index 061d1814ed4..7e6bb28ee26 100644
--- a/src/plugins/projectexplorer/customparserconfigdialog.cpp
+++ b/src/plugins/projectexplorer/customparserconfigdialog.cpp
@@ -26,6 +26,8 @@
#include "customparserconfigdialog.h"
#include "ui_customparserconfigdialog.h"
+#include <utils/theme/theme.h>
+
#include <QLineEdit>
#include <QPushButton>
#include <QRegularExpression>
@@ -270,13 +272,17 @@ bool CustomParserConfigDialog::checkPattern(QLineEdit *pattern, const QString &o
rx.setPattern(pattern->text());
QPalette palette;
- palette.setColor(QPalette::Text, rx.isValid() ? Qt::black : Qt::red);
+ palette.setColor(QPalette::Text,
+ Utils::creatorTheme()->color(rx.isValid() ? Utils::Theme::TextColorNormal
+ : Utils::Theme::TextColorError));
pattern->setPalette(palette);
pattern->setToolTip(rx.isValid() ? QString() : rx.errorString());
*match = rx.match(outputText);
if (rx.pattern().isEmpty() || !rx.isValid() || !match->hasMatch()) {
- *errorMessage = QLatin1String("<font color=\"red\">") + tr("Not applicable:") + QLatin1Char(' ');
+ *errorMessage = QString::fromLatin1("<font color=\"%1\">%2 ").arg(
+ Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(),
+ tr("Not applicable:"));
if (rx.pattern().isEmpty())
*errorMessage += tr("Pattern is empty.");
else if (!rx.isValid())