summaryrefslogtreecommitdiffstats
path: root/application/groupview
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-04 01:17:28 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-04 01:19:04 +0100
commit87dd9515052661e622587cafcf972ea1beee8195 (patch)
treeb0e491c544180a9629f78b4fb9df3a383858b26b /application/groupview
parent3780a25d27ae5c803ce9ed075928fff365104987 (diff)
downloadMultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.gz
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.lz
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.tar.xz
MultiMC-87dd9515052661e622587cafcf972ea1beee8195.zip
NOISSUE add a badge for crashed instances
Not persistent across MultiMC runs.
Diffstat (limited to 'application/groupview')
-rw-r--r--application/groupview/InstanceDelegate.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/application/groupview/InstanceDelegate.cpp b/application/groupview/InstanceDelegate.cpp
index 359dd3cf..b88f9a8a 100644
--- a/application/groupview/InstanceDelegate.cpp
+++ b/application/groupview/InstanceDelegate.cpp
@@ -113,18 +113,21 @@ void drawProgressOverlay(QPainter *painter, const QStyleOptionViewItemV4 &option
void drawBadges(QPainter *painter, const QStyleOptionViewItemV4 &option, BaseInstance *instance)
{
QList<QString> pixmaps;
- const BaseInstance::InstanceFlags flags = instance->flags();
- if (flags & BaseInstance::VersionBrokenFlag)
+ if (instance->isRunning())
{
- pixmaps.append("broken");
+ pixmaps.append("status-running");
}
- if (flags & BaseInstance::UpdateAvailable)
+ else if (instance->hasCrashed())
{
- pixmaps.append("updateavailable");
+ pixmaps.append("status-bad");
}
- if (instance->isRunning())
+ if (instance->hasVersionBroken())
{
- pixmaps.append("status-running");
+ pixmaps.append("broken");
+ }
+ if (instance->hasUpdateAvailable())
+ {
+ pixmaps.append("updateavailable");
}
// begin easter eggs