From e95b513cfcdbe1dedb95fffaa12a0ba736b6761f Mon Sep 17 00:00:00 2001
From: dteviot <dteviot@gmail.co.nz>
Date: Sun, 11 Jan 2015 16:33:03 +1300
Subject: [PATCH] Use icon to show files with problem (Fixes #2268)

Launcher now indicates files with problem using an icon.
Using red text for files with load order issue removed because it doesn't work well with dark themes.
---
 components/contentselector/model/contentmodel.cpp | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/components/contentselector/model/contentmodel.cpp b/components/contentselector/model/contentmodel.cpp
index 6c5614f13a..5760a327eb 100644
--- a/components/contentselector/model/contentmodel.cpp
+++ b/components/contentselector/model/contentmodel.cpp
@@ -7,6 +7,7 @@
 #include <QTextCodec>
 #include <QDebug>
 #include <QBrush>
+#include <QIcon>
 
 #include "components/esm/esmreader.hpp"
 
@@ -177,14 +178,9 @@ QVariant ContentSelectorModel::ContentModel::data(const QModelIndex &index, int
 
     switch (role)
     {
-    case Qt::ForegroundRole:
+    case Qt::DecorationRole:
     {
-        if (isLoadOrderError(file))
-        {
-            QBrush redBackground(Qt::red, Qt::SolidPattern);
-            return redBackground;
-        }
-        break;
+        return isLoadOrderError(file) ? QIcon::fromTheme("edit-delete") : QVariant();
     }
 
     case Qt::EditRole:
@@ -618,7 +614,7 @@ QString ContentSelectorModel::ContentModel::toolTip(const EsmFile *file) const
 {
     if (isLoadOrderError(file))
     {
-        QString text("<font color=#840000><b>");
+        QString text("<b>");
         int index = indexFromItem(item(file->filePath())).row();
         foreach(const LoadOrderError& error, checkForLoadOrderErrors(file, index))
         {
@@ -626,7 +622,7 @@ QString ContentSelectorModel::ContentModel::toolTip(const EsmFile *file) const
             text += error.toolTip();
             text += "</p>";
         }
-        text += ("</b></font>");
+        text += ("</b>");
         text += file->toolTip();
         return text;
     }