QTfrontend/model/ThemeModel.cpp
changeset 8475 f605bc59c603
parent 8464 c708b4f5cffc
child 9080 9b42757d7e71
--- a/QTfrontend/model/ThemeModel.cpp	Fri Feb 08 21:22:11 2013 -0500
+++ b/QTfrontend/model/ThemeModel.cpp	Sat Feb 09 15:26:10 2013 -0500
@@ -76,24 +76,21 @@
 
         // detect if theme is dlc
         QString themeDir = PHYSFS_getRealDir(QString("Themes/%1/icon.png").arg(theme).toLocal8Bit().data());
-        dataset.insert(Qt::UserRole + 2, !themeDir.startsWith(datadir->absolutePath()));
+        bool isDLC = !themeDir.startsWith(datadir->absolutePath());
+        dataset.insert(IsDlcRole, isDLC);
 
         // set icon path
-        dataset.insert(Qt::UserRole + 1, iconpath);
+        dataset.insert(IconPathRole, iconpath);
 
         // set name
-        dataset.insert(Qt::DisplayRole, theme);
+        dataset.insert(ActualNameRole, theme);
 
-        // load and set icon
-        QIcon icon;
-        icon.addPixmap(QPixmap(iconpath), QIcon::Normal);
-        icon.addPixmap(QPixmap(iconpath), QIcon::Disabled);
-
-        dataset.insert(Qt::DecorationRole, icon);
+        // set displayed name
+        dataset.insert(Qt::DisplayRole, (isDLC ? "*" : "") + theme);
 
         // load and set preview icon
         QIcon preview(QString("physfs://Themes/%1/icon@2x.png").arg(theme));
-        dataset.insert(Qt::UserRole, preview);
+        dataset.insert(Qt::DecorationRole, preview);
 
         m_data.append(dataset);
     }