diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-12-11 20:31:17 -0600 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-12-11 20:31:17 -0600 |
| commit | 68a1afed49a204268e5b1ca374f3989766d75706 (patch) | |
| tree | 0c240e1e69a8fde4e79ec8faea222acefa8bd858 /src/modlist.cpp | |
| parent | 7b1ece5f28aff9fc874851f2e3d481ff29ff3c9f (diff) | |
Implement separator text color in a way that doesn't break everything else
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
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();
|
