Commit 8d7f23f7 authored by Laurent Montel's avatar Laurent Montel 😁

Fix default text color

parent 610b769e
......@@ -50,7 +50,11 @@ void AdBlockAutomaticRulesListWidget::updateItem(QListWidgetItem *item)
} else if (rule.contains(QRegularExpression(QStringLiteral(".*##.*")))) {
item->setTextColor(Qt::blue);
} else {
item->setTextColor(Qt::black);
if (!defaultTextColor.isValid()) {
const QPalette palette = viewport()->palette();
defaultTextColor = palette.text().color();
}
item->setTextColor(defaultTextColor);
}
} else {
font.setItalic(true);
......
......@@ -40,6 +40,7 @@ private:
void updateItem(QListWidgetItem *item);
void createItem(const QString &rule);
QStringList mDisabledRules;
QColor defaultTextColor;
};
}
......
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