From 68a1afed49a204268e5b1ca374f3989766d75706 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Tue, 11 Dec 2018 20:31:17 -0600 Subject: Implement separator text color in a way that doesn't break everything else --- src/modlist.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/modlist.cpp') diff --git a/src/modlist.cpp b/src/modlist.cpp index ee7db894..16d2cd07 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -378,16 +378,15 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const } } return QVariant(); - } else if (role == Qt::TextColorRole) { + } else if (role == Qt::ForegroundRole) { if (modInfo->hasFlag(ModInfo::FLAG_SEPARATOR) && modInfo->getColor().isValid()) { return Settings::getIdealTextColor(modInfo->getColor()); - } - return QVariant(); - } else if (role == Qt::ForegroundRole) { - if (column == COL_NAME) { + } else if (column == COL_NAME) { int highlight = modInfo->getHighlight(); - if (highlight & ModInfo::HIGHLIGHT_IMPORTANT) return QBrush(Qt::darkRed); - else if (highlight & ModInfo::HIGHLIGHT_INVALID) return QBrush(Qt::darkGray); + if (highlight & ModInfo::HIGHLIGHT_IMPORTANT) + return QBrush(Qt::darkRed); + else if (highlight & ModInfo::HIGHLIGHT_INVALID) + return QBrush(Qt::darkGray); } else if (column == COL_VERSION) { if (!modInfo->getNewestVersion().isValid()) { return QVariant(); -- cgit v1.3.1