summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-10 02:54:53 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-10 02:54:53 +0100
commitf9d94a45eebd5fb7b14d4bcc6ad77cb96ecdd771 (patch)
tree0b8f492b470c835bc814ebc786dc73bfe2b0f3f4
parent27e26a656b8d9f0aef1dd6a18b50ecc9465494bd (diff)
downloadMultiMC-f9d94a45eebd5fb7b14d4bcc6ad77cb96ecdd771.tar
MultiMC-f9d94a45eebd5fb7b14d4bcc6ad77cb96ecdd771.tar.gz
MultiMC-f9d94a45eebd5fb7b14d4bcc6ad77cb96ecdd771.tar.lz
MultiMC-f9d94a45eebd5fb7b14d4bcc6ad77cb96ecdd771.tar.xz
MultiMC-f9d94a45eebd5fb7b14d4bcc6ad77cb96ecdd771.zip
NOISSUE allow using icon themes for instances and instance badges
-rw-r--r--api/gui/icons/IconList.cpp47
-rw-r--r--api/gui/icons/IconList.h3
-rw-r--r--api/gui/icons/MMCIcon.cpp21
-rw-r--r--api/gui/icons/MMCIcon.h5
-rw-r--r--application/CMakeLists.txt1
-rw-r--r--application/MultiMC.cpp8
-rw-r--r--application/groupview/InstanceDelegate.cpp76
-rw-r--r--application/groupview/InstanceDelegate.h5
-rw-r--r--application/main.cpp1
-rw-r--r--application/resources/instances/broken.pngbin1139 -> 0 bytes
-rw-r--r--application/resources/instances/derp.pngbin5225 -> 0 bytes
-rw-r--r--application/resources/instances/instances.qrc51
-rw-r--r--application/resources/instances/kitten.pngbin1605 -> 0 bytes
-rw-r--r--application/resources/instances/status-bad.pngbin1102 -> 0 bytes
-rw-r--r--application/resources/instances/status-running.pngbin1059 -> 0 bytes
-rw-r--r--application/resources/instances/updateavailable.pngbin2480 -> 0 bytes
-rw-r--r--application/resources/multimc/128x128/instances/chicken.png (renamed from application/resources/instances/chicken128.png)bin6369 -> 6369 bytes
-rw-r--r--application/resources/multimc/128x128/instances/creeper.png (renamed from application/resources/instances/creeper128.png)bin9046 -> 9046 bytes
-rw-r--r--application/resources/multimc/128x128/instances/enderpearl.png (renamed from application/resources/instances/enderpearl128.png)bin21425 -> 21425 bytes
-rw-r--r--application/resources/multimc/128x128/instances/ftb_glow.png (renamed from application/resources/instances/ftb_glow128.png)bin12708 -> 12708 bytes
-rw-r--r--application/resources/multimc/128x128/instances/ftb_logo.png (renamed from application/resources/instances/ftb_logo128.png)bin7883 -> 7883 bytes
-rw-r--r--application/resources/multimc/128x128/instances/gear.png (renamed from application/resources/instances/gear128.png)bin18321 -> 18321 bytes
-rw-r--r--application/resources/multimc/128x128/instances/herobrine.png (renamed from application/resources/instances/herobrine128.png)bin4937 -> 4937 bytes
-rw-r--r--application/resources/multimc/128x128/instances/infinity.png (renamed from application/resources/instances/infinity128.png)bin9237 -> 9237 bytes
-rw-r--r--application/resources/multimc/128x128/instances/magitech.png (renamed from application/resources/instances/magitech128.png)bin23097 -> 23097 bytes
-rw-r--r--application/resources/multimc/128x128/instances/meat.png (renamed from application/resources/instances/meat128.png)bin10583 -> 10583 bytes
-rw-r--r--application/resources/multimc/128x128/instances/netherstar.png (renamed from application/resources/instances/netherstar128.png)bin14062 -> 14062 bytes
-rw-r--r--application/resources/multimc/128x128/instances/skeleton.png (renamed from application/resources/instances/skeleton128.png)bin3673 -> 3673 bytes
-rw-r--r--application/resources/multimc/128x128/instances/squarecreeper.png (renamed from application/resources/instances/squarecreeper128.png)bin9136 -> 9136 bytes
-rw-r--r--application/resources/multimc/128x128/instances/steve.png (renamed from application/resources/instances/steve128.png)bin4312 -> 4312 bytes
-rw-r--r--application/resources/multimc/32x32/instances/brick.png (renamed from application/resources/instances/brick.png)bin713 -> 713 bytes
-rw-r--r--application/resources/multimc/32x32/instances/chicken.png (renamed from application/resources/instances/chicken.png)bin1181 -> 1181 bytes
-rw-r--r--application/resources/multimc/32x32/instances/creeper.png (renamed from application/resources/instances/creeper.png)bin1524 -> 1524 bytes
-rw-r--r--application/resources/multimc/32x32/instances/diamond.png (renamed from application/resources/instances/diamond.png)bin708 -> 708 bytes
-rw-r--r--application/resources/multimc/32x32/instances/dirt.png (renamed from application/resources/instances/dirt.png)bin482 -> 482 bytes
-rw-r--r--application/resources/multimc/32x32/instances/enderpearl.png (renamed from application/resources/instances/enderpearl.png)bin2120 -> 2120 bytes
-rw-r--r--application/resources/multimc/32x32/instances/ftb_glow.png (renamed from application/resources/instances/ftb_glow.png)bin1747 -> 1747 bytes
-rw-r--r--application/resources/multimc/32x32/instances/ftb_logo.png (renamed from application/resources/instances/ftb_logo.png)bin1607 -> 1607 bytes
-rw-r--r--application/resources/multimc/32x32/instances/gear.png (renamed from application/resources/instances/gear.png)bin2414 -> 2414 bytes
-rw-r--r--application/resources/multimc/32x32/instances/gold.png (renamed from application/resources/instances/gold.png)bin978 -> 978 bytes
-rw-r--r--application/resources/multimc/32x32/instances/grass.png (renamed from application/resources/instances/grass.png)bin618 -> 618 bytes
-rw-r--r--application/resources/multimc/32x32/instances/herobrine.png (renamed from application/resources/instances/herobrine.png)bin1034 -> 1034 bytes
-rw-r--r--application/resources/multimc/32x32/instances/infinity.png (renamed from application/resources/instances/infinity.png)bin1714 -> 1714 bytes
-rw-r--r--application/resources/multimc/32x32/instances/iron.png (renamed from application/resources/instances/iron.png)bin532 -> 532 bytes
-rw-r--r--application/resources/multimc/32x32/instances/magitech.png (renamed from application/resources/instances/magitech.png)bin2646 -> 2646 bytes
-rw-r--r--application/resources/multimc/32x32/instances/meat.png (renamed from application/resources/instances/meat.png)bin1514 -> 1514 bytes
-rw-r--r--application/resources/multimc/32x32/instances/netherstar.png (renamed from application/resources/instances/netherstar.png)bin1942 -> 1942 bytes
-rw-r--r--application/resources/multimc/32x32/instances/planks.png (renamed from application/resources/instances/planks.png)bin461 -> 461 bytes
-rw-r--r--application/resources/multimc/32x32/instances/skeleton.png (renamed from application/resources/instances/skeleton.png)bin696 -> 696 bytes
-rw-r--r--application/resources/multimc/32x32/instances/squarecreeper.png (renamed from application/resources/instances/squarecreeper.png)bin1623 -> 1623 bytes
-rw-r--r--application/resources/multimc/32x32/instances/steve.png (renamed from application/resources/instances/steve.png)bin969 -> 969 bytes
-rw-r--r--application/resources/multimc/32x32/instances/stone.png (renamed from application/resources/instances/stone.png)bin438 -> 438 bytes
-rw-r--r--application/resources/multimc/32x32/instances/tnt.png (renamed from application/resources/instances/tnt.png)bin378 -> 378 bytes
-rw-r--r--application/resources/multimc/50x50/instances/enderman.png (renamed from application/resources/instances/enderman.png)bin2429 -> 2429 bytes
-rw-r--r--application/resources/multimc/index.theme22
-rw-r--r--application/resources/multimc/multimc.qrc56
56 files changed, 165 insertions, 131 deletions
diff --git a/api/gui/icons/IconList.cpp b/api/gui/icons/IconList.cpp
index bdcada32..100a69c3 100644
--- a/api/gui/icons/IconList.cpp
+++ b/api/gui/icons/IconList.cpp
@@ -25,15 +25,23 @@
#define MAX_SIZE 1024
-IconList::IconList(QString builtinPath, QString path, QObject *parent) : QAbstractListModel(parent)
+IconList::IconList(const QStringList &builtinPaths, QString path, QObject *parent) : QAbstractListModel(parent)
{
+ QSet<QString> builtinNames;
+
// add builtin icons
- QDir instance_icons(builtinPath);
- auto file_info_list = instance_icons.entryInfoList(QDir::Files, QDir::Name);
- for (auto file_info : file_info_list)
+ for(auto & builtinPath: builtinPaths)
{
- QString key = file_info.baseName();
- addIcon(key, key, file_info.absoluteFilePath(), IconType::Builtin);
+ QDir instance_icons(builtinPath);
+ auto file_info_list = instance_icons.entryInfoList(QDir::Files, QDir::Name);
+ for (auto file_info : file_info_list)
+ {
+ builtinNames.insert(file_info.baseName());
+ }
+ }
+ for(auto & builtinName : builtinNames)
+ {
+ addThemeIcon(builtinName);
}
m_watcher.reset(new QFileSystemWatcher());
@@ -292,6 +300,33 @@ bool IconList::deleteIcon(const QString &key)
return false;
}
+bool IconList::addThemeIcon(const QString& key)
+{
+ auto iter = name_index.find(key);
+ if (iter != name_index.end())
+ {
+ auto &oldOne = icons[*iter];
+ oldOne.replace(Builtin, key);
+ dataChanged(index(*iter), index(*iter));
+ return true;
+ }
+ else
+ {
+ // add a new icon
+ beginInsertRows(QModelIndex(), icons.size(), icons.size());
+ {
+ MMCIcon mmc_icon;
+ mmc_icon.m_name = key;
+ mmc_icon.m_key = key;
+ mmc_icon.replace(Builtin, key);
+ icons.push_back(mmc_icon);
+ name_index[key] = icons.size() - 1;
+ }
+ endInsertRows();
+ return true;
+ }
+}
+
bool IconList::addIcon(const QString &key, const QString &name, const QString &path, const IconType type)
{
// replace the icon even? is the input valid?
diff --git a/api/gui/icons/IconList.h b/api/gui/icons/IconList.h
index 7b07797f..f6b2ed0a 100644
--- a/api/gui/icons/IconList.h
+++ b/api/gui/icons/IconList.h
@@ -34,7 +34,7 @@ class MULTIMC_GUI_EXPORT IconList : public QAbstractListModel, public IIconList
{
Q_OBJECT
public:
- explicit IconList(QString builtinPath, QString path, QObject *parent = 0);
+ explicit IconList(const QStringList &builtinPaths, QString path, QObject *parent = 0);
virtual ~IconList() {};
QIcon getIcon(const QString &key) const;
@@ -44,6 +44,7 @@ public:
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ bool addThemeIcon(const QString &key);
bool addIcon(const QString &key, const QString &name, const QString &path, const IconType type) override;
void saveIcon(const QString &key, const QString &path, const char * format) const override;
bool deleteIcon(const QString &key) override;
diff --git a/api/gui/icons/MMCIcon.cpp b/api/gui/icons/MMCIcon.cpp
index f71281d0..11ad93e2 100644
--- a/api/gui/icons/MMCIcon.cpp
+++ b/api/gui/icons/MMCIcon.cpp
@@ -15,6 +15,7 @@
#include "MMCIcon.h"
#include <QFileInfo>
+#include <xdgicon.h>
IconType operator--(IconType &t, int)
{
@@ -58,7 +59,11 @@ QIcon MMCIcon::icon() const
{
if (m_current_type == IconType::ToBeDeleted)
return QIcon();
- return m_images[m_current_type].icon;
+ auto & icon = m_images[m_current_type].icon;
+ if(!icon.isNull())
+ return icon;
+ // FIXME: inject this.
+ return XdgIcon::fromTheme(m_images[m_current_type].key);
}
void MMCIcon::remove(IconType rm_type)
@@ -78,12 +83,22 @@ void MMCIcon::remove(IconType rm_type)
void MMCIcon::replace(IconType new_type, QIcon icon, QString path)
{
- QFileInfo foo(path);
if (new_type > m_current_type || m_current_type == IconType::ToBeDeleted)
{
m_current_type = new_type;
}
m_images[new_type].icon = icon;
- m_images[new_type].changed = foo.lastModified();
m_images[new_type].filename = path;
+ m_images[new_type].key = QString();
+}
+
+void MMCIcon::replace(IconType new_type, const QString& key)
+{
+ if (new_type > m_current_type || m_current_type == IconType::ToBeDeleted)
+ {
+ m_current_type = new_type;
+ }
+ m_images[new_type].icon = QIcon();
+ m_images[new_type].filename = QString();
+ m_images[new_type].key = key;
}
diff --git a/api/gui/icons/MMCIcon.h b/api/gui/icons/MMCIcon.h
index 4bc7ecdc..23231945 100644
--- a/api/gui/icons/MMCIcon.h
+++ b/api/gui/icons/MMCIcon.h
@@ -24,11 +24,11 @@
struct MULTIMC_GUI_EXPORT MMCImage
{
QIcon icon;
+ QString key;
QString filename;
- QDateTime changed;
bool present() const
{
- return !icon.isNull();
+ return !icon.isNull() && !key.isEmpty();
}
};
@@ -45,4 +45,5 @@ struct MULTIMC_GUI_EXPORT MMCIcon
QIcon icon() const;
void remove(IconType rm_type);
void replace(IconType new_type, QIcon icon, QString path = QString());
+ void replace(IconType new_type, const QString &key);
};
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index f89de0cb..64879e27 100644
--- a/application/CMakeLists.txt
+++ b/application/CMakeLists.txt
@@ -304,7 +304,6 @@ set(MULTIMC_QRCS
resources/pe_blue/pe_blue.qrc
resources/OSX/OSX.qrc
resources/iOS/iOS.qrc
- resources/instances/instances.qrc
resources/versions/versions.qrc
resources/certs/certs.qrc
)
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index 2cc934f1..c102e198 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -411,7 +411,13 @@ void MultiMC::initTranslations()
void MultiMC::initIcons()
{
auto setting = MMC->settings()->getSetting("IconsDir");
- m_icons.reset(new IconList(QString(":/icons/instances/"), setting->get().toString()));
+ QStringList instFolders =
+ {
+ ":/icons/multimc/32x32/instances/",
+ ":/icons/multimc/50x50/instances/",
+ ":/icons/multimc/128x128/instances/"
+ };
+ m_icons.reset(new IconList(instFolders, setting->get().toString()));
connect(setting.get(), &Setting::SettingChanged,[&](const Setting &, QVariant value)
{
m_icons->directoryChanged(value.toString());
diff --git a/application/groupview/InstanceDelegate.cpp b/application/groupview/InstanceDelegate.cpp
index b88f9a8a..532b9d5b 100644
--- a/application/groupview/InstanceDelegate.cpp
+++ b/application/groupview/InstanceDelegate.cpp
@@ -23,8 +23,7 @@
#include "GroupView.h"
#include "BaseInstance.h"
#include "InstanceList.h"
-
-QCache<QString, QPixmap> ListViewDelegate::m_pixmapCache;
+#include <xdgicon.h>
// Origin: Qt
static void viewItemTextLayout(QTextLayout &textLayout, int lineWidth, qreal &height,
@@ -110,46 +109,21 @@ void drawProgressOverlay(QPainter *painter, const QStyleOptionViewItemV4 &option
painter->restore();
}
-void drawBadges(QPainter *painter, const QStyleOptionViewItemV4 &option, BaseInstance *instance)
+void drawBadges(QPainter *painter, const QStyleOptionViewItemV4 &option, BaseInstance *instance, QIcon::Mode mode, QIcon::State state)
{
QList<QString> pixmaps;
if (instance->isRunning())
{
pixmaps.append("status-running");
}
- else if (instance->hasCrashed())
+ else if (instance->hasCrashed() || instance->hasVersionBroken())
{
pixmaps.append("status-bad");
}
- if (instance->hasVersionBroken())
- {
- pixmaps.append("broken");
- }
if (instance->hasUpdateAvailable())
{
- pixmaps.append("updateavailable");
- }
-
- // begin easter eggs
- if (instance->name().contains("btw", Qt::CaseInsensitive) ||
- instance->name().contains("better then wolves", Qt::CaseInsensitive) ||
- instance->name().contains("better than wolves", Qt::CaseInsensitive))
- {
- pixmaps.append("herobrine");
- }
- if (instance->name().contains("direwolf", Qt::CaseInsensitive))
- {
- pixmaps.append("enderman");
- }
- if (instance->name().contains("kitten", Qt::CaseInsensitive))
- {
- pixmaps.append("kitten");
- }
- if (instance->name().contains("derp", Qt::CaseInsensitive))
- {
- pixmaps.append("derp");
+ pixmaps.append("checkupdate");
}
- // end easter eggs
static const int itemSide = 24;
static const int spacing = 1;
@@ -165,11 +139,18 @@ void drawBadges(QPainter *painter, const QStyleOptionViewItemV4 &option, BaseIns
{
return;
}
- const QPixmap pixmap = ListViewDelegate::requestBadgePixmap(it.next()).scaled(
- itemSide, itemSide, Qt::KeepAspectRatio, Qt::FastTransformation);
- painter->drawPixmap(option.rect.width() - x * itemSide + qMax(x - 1, 0) * spacing - itemSide,
- y * itemSide + qMax(y - 1, 0) * spacing, itemSide, itemSide,
- pixmap);
+ // FIXME: inject this.
+ auto icon = XdgIcon::fromTheme(it.next());
+ // opt.icon.paint(painter, iconbox, Qt::AlignCenter, mode, state);
+ const QPixmap pixmap;
+ // itemSide
+ QRect badgeRect(
+ option.rect.width() - x * itemSide + qMax(x - 1, 0) * spacing - itemSide,
+ y * itemSide + qMax(y - 1, 0) * spacing,
+ itemSide,
+ itemSide
+ );
+ icon.paint(painter, badgeRect, Qt::AlignCenter, mode, state);
}
}
painter->translate(-option.rect.topLeft());
@@ -274,15 +255,16 @@ void ListViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
*/
}
+ // icon mode and state, also used for badges
+ QIcon::Mode mode = QIcon::Normal;
+ if (!(opt.state & QStyle::State_Enabled))
+ mode = QIcon::Disabled;
+ else if (opt.state & QStyle::State_Selected)
+ mode = QIcon::Selected;
+ QIcon::State state = opt.state & QStyle::State_Open ? QIcon::On : QIcon::Off;
+
// draw the icon
{
- QIcon::Mode mode = QIcon::Normal;
- if (!(opt.state & QStyle::State_Enabled))
- mode = QIcon::Disabled;
- else if (opt.state & QStyle::State_Selected)
- mode = QIcon::Selected;
- QIcon::State state = opt.state & QStyle::State_Open ? QIcon::On : QIcon::Off;
-
iconbox.setHeight(iconSize);
opt.icon.paint(painter, iconbox, Qt::AlignCenter, mode, state);
}
@@ -329,7 +311,7 @@ void ListViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
.value<void *>();
if (instance)
{
- drawBadges(painter, opt, instance);
+ drawBadges(painter, opt, instance, mode, state);
}
drawProgressOverlay(painter, opt, index.data(GroupViewRoles::ProgressValueRole).toInt(),
@@ -359,11 +341,3 @@ QSize ListViewDelegate::sizeHint(const QStyleOptionViewItem &option,
return sz;
}
-QPixmap ListViewDelegate::requestBadgePixmap(const QString &key)
-{
- if (!m_pixmapCache.contains(key))
- {
- m_pixmapCache.insert(key, new QPixmap(":/icons/badges/" + key + ".png"));
- }
- return *m_pixmapCache.object(key);
-}
diff --git a/application/groupview/InstanceDelegate.h b/application/groupview/InstanceDelegate.h
index 2b5439cb..f62df99e 100644
--- a/application/groupview/InstanceDelegate.h
+++ b/application/groupview/InstanceDelegate.h
@@ -23,13 +23,8 @@ class ListViewDelegate : public QStyledItemDelegate
public:
explicit ListViewDelegate(QObject *parent = 0);
- static QPixmap requestBadgePixmap(const QString &key);
-
protected:
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
-
-private:
- static QCache<QString, QPixmap> m_pixmapCache;
};
diff --git a/application/main.cpp b/application/main.cpp
index 5b557170..61771f6e 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -13,7 +13,6 @@ int main(int argc, char *argv[])
{
case MultiMC::Initialized:
{
- Q_INIT_RESOURCE(instances);
Q_INIT_RESOURCE(multimc);
Q_INIT_RESOURCE(backgrounds);
Q_INIT_RESOURCE(versions);
diff --git a/application/resources/instances/broken.png b/application/resources/instances/broken.png
deleted file mode 100644
index 7a80a76e..00000000
--- a/application/resources/instances/broken.png
+++ /dev/null
Binary files differ
diff --git a/application/resources/instances/derp.png b/application/resources/instances/derp.png
deleted file mode 100644
index 4c361942..00000000
--- a/application/resources/instances/derp.png
+++ /dev/null
Binary files differ
diff --git a/application/resources/instances/instances.qrc b/application/resources/instances/instances.qrc
deleted file mode 100644
index 1f90762a..00000000
--- a/application/resources/instances/instances.qrc
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE RCC>
-<RCC version="1.0">
- <qresource prefix="/icons/instances">
- <!-- Source: Mojang -->
- <file alias="brick">brick.png</file>
- <file alias="diamond">diamond.png</file>
- <file alias="dirt">dirt.png</file>
- <file alias="gold">gold.png</file>
- <file alias="grass">grass.png</file>
- <file alias="stone">stone.png</file>
- <file alias="tnt">tnt.png</file>
- <file alias="iron">iron.png</file>
- <file alias="planks">planks.png</file>
-
- <!-- Source: Unknown -->
- <file alias="derp">derp.png</file>
- <file alias="enderman">enderman.png</file>
-
- <!-- Our own. -->
- <file alias="chicken">chicken128.png</file>
- <file alias="creeper">creeper128.png</file>
- <file alias="enderpearl">enderpearl128.png</file>
- <file alias="ftb-glow">ftb_glow128.png</file>
- <file alias="ftb-logo">ftb_logo128.png</file>
- <file alias="gear">gear128.png</file>
- <file alias="herobrine">herobrine128.png</file>
- <file alias="infinity">infinity128.png</file>
- <file alias="magitech">magitech128.png</file>
- <file alias="meat">meat128.png</file>
- <file alias="netherstar">netherstar128.png</file>
- <file alias="skeleton">skeleton128.png</file>
- <file alias="squarecreeper">squarecreeper128.png</file>
- <file alias="steve">steve128.png</file>
- </qresource>
- <qresource prefix="/icons/badges">
- <!-- Source: see above -->
- <file>enderman.png</file>
- <file>herobrine.png</file>
- <file>derp.png</file>
- <file>status-running.png</file>
- <file>status-bad.png</file>
-
- <!-- Update. GPLv2, https://code.google.com/p/gnome-colors/ -->
- <file>updateavailable.png</file>
-
- <!-- Source: http://www.iconarchive.com/show/cat-icons-by-fasticon/Cat-Brown-icon.html -->
- <file>kitten.png</file>
- <!-- Source: http://www.iconarchive.com/show/crystal-clear-icons-by-everaldo/Filesystem-file-broken-icon.html -->
- <file>broken.png</file>
- </qresource>
-</RCC>
diff --git a/application/resources/instances/kitten.png b/application/resources/instances/kitten.png
deleted file mode 100644
index d17661ce..00000000
--- a/application/resources/instances/kitten.png
+++ /dev/null
Binary files differ
diff --git a/application/resources/instances/status-bad.png b/application/resources/instances/status-bad.png
deleted file mode 100644
index d1547a47..00000000
--- a/application/resources/instances/status-bad.png
+++ /dev/null
Binary files differ
diff --git a/application/resources/instances/status-running.png b/application/resources/instances/status-running.png
deleted file mode 100644
index ecd64451..00000000
--- a/application/resources/instances/status-running.png
+++ /dev/null
Binary files differ
diff --git a/application/resources/instances/updateavailable.png b/application/resources/instances/updateavailable.png
deleted file mode 100644
index 754005f9..00000000
--- a/application/resources/instances/updateavailable.png
+++ /dev/null
Binary files differ
diff --git a/application/resources/instances/chicken128.png b/application/resources/multimc/128x128/instances/chicken.png
index 71f6dedc..71f6dedc 100644
--- a/application/resources/instances/chicken128.png
+++ b/application/resources/multimc/128x128/instances/chicken.png
Binary files differ
diff --git a/application/resources/instances/creeper128.png b/application/resources/multimc/128x128/instances/creeper.png
index 41b7d07d..41b7d07d 100644
--- a/application/resources/instances/creeper128.png
+++ b/application/resources/multimc/128x128/instances/creeper.png
Binary files differ
diff --git a/application/resources/instances/enderpearl128.png b/application/resources/multimc/128x128/instances/enderpearl.png
index 0a5bf91a..0a5bf91a 100644
--- a/application/resources/instances/enderpearl128.png
+++ b/application/resources/multimc/128x128/instances/enderpearl.png
Binary files differ
diff --git a/application/resources/instances/ftb_glow128.png b/application/resources/multimc/128x128/instances/ftb_glow.png
index 86632b21..86632b21 100644
--- a/application/resources/instances/ftb_glow128.png
+++ b/application/resources/multimc/128x128/instances/ftb_glow.png
Binary files differ
diff --git a/application/resources/instances/ftb_logo128.png b/application/resources/multimc/128x128/instances/ftb_logo.png
index e725b7fe..e725b7fe 100644
--- a/application/resources/instances/ftb_logo128.png
+++ b/application/resources/multimc/128x128/instances/ftb_logo.png
Binary files differ
diff --git a/application/resources/instances/gear128.png b/application/resources/multimc/128x128/instances/gear.png
index 75c68a66..75c68a66 100644
--- a/application/resources/instances/gear128.png
+++ b/application/resources/multimc/128x128/instances/gear.png
Binary files differ
diff --git a/application/resources/instances/herobrine128.png b/application/resources/multimc/128x128/instances/herobrine.png
index 13f1494c..13f1494c 100644
--- a/application/resources/instances/herobrine128.png
+++ b/application/resources/multimc/128x128/instances/herobrine.png
Binary files differ
diff --git a/application/resources/instances/infinity128.png b/application/resources/multimc/128x128/instances/infinity.png
index 226847fb..226847fb 100644
--- a/application/resources/instances/infinity128.png
+++ b/application/resources/multimc/128x128/instances/infinity.png
Binary files differ
diff --git a/application/resources/instances/magitech128.png b/application/resources/multimc/128x128/instances/magitech.png
index 0f81a199..0f81a199 100644
--- a/application/resources/instances/magitech128.png
+++ b/application/resources/multimc/128x128/instances/magitech.png
Binary files differ
diff --git a/application/resources/instances/meat128.png b/application/resources/multimc/128x128/instances/meat.png
index fefc9bf1..fefc9bf1 100644
--- a/application/resources/instances/meat128.png
+++ b/application/resources/multimc/128x128/instances/meat.png
Binary files differ
diff --git a/application/resources/instances/netherstar128.png b/application/resources/multimc/128x128/instances/netherstar.png
index 132085f0..132085f0 100644
--- a/application/resources/instances/netherstar128.png
+++ b/application/resources/multimc/128x128/instances/netherstar.png
Binary files differ
diff --git a/application/resources/instances/skeleton128.png b/application/resources/multimc/128x128/instances/skeleton.png
index 55fcf5a9..55fcf5a9 100644
--- a/application/resources/instances/skeleton128.png
+++ b/application/resources/multimc/128x128/instances/skeleton.png
Binary files differ
diff --git a/application/resources/instances/squarecreeper128.png b/application/resources/multimc/128x128/instances/squarecreeper.png
index c82d8406..c82d8406 100644
--- a/application/resources/instances/squarecreeper128.png
+++ b/application/resources/multimc/128x128/instances/squarecreeper.png
Binary files differ
diff --git a/application/resources/instances/steve128.png b/application/resources/multimc/128x128/instances/steve.png
index a07cbd2f..a07cbd2f 100644
--- a/application/resources/instances/steve128.png
+++ b/application/resources/multimc/128x128/instances/steve.png
Binary files differ
diff --git a/application/resources/instances/brick.png b/application/resources/multimc/32x32/instances/brick.png
index 0b534366..0b534366 100644
--- a/application/resources/instances/brick.png
+++ b/application/resources/multimc/32x32/instances/brick.png
Binary files differ
diff --git a/application/resources/instances/chicken.png b/application/resources/multimc/32x32/instances/chicken.png
index f870467a..f870467a 100644
--- a/application/resources/instances/chicken.png
+++ b/application/resources/multimc/32x32/instances/chicken.png
Binary files differ
diff --git a/application/resources/instances/creeper.png b/application/resources/multimc/32x32/instances/creeper.png
index a67ecfc3..a67ecfc3 100644
--- a/application/resources/instances/creeper.png
+++ b/application/resources/multimc/32x32/instances/creeper.png
Binary files differ
diff --git a/application/resources/instances/diamond.png b/application/resources/multimc/32x32/instances/diamond.png
index 376ab901..376ab901 100644
--- a/application/resources/instances/diamond.png
+++ b/application/resources/multimc/32x32/instances/diamond.png
Binary files differ
diff --git a/application/resources/instances/dirt.png b/application/resources/multimc/32x32/instances/dirt.png
index 9e19eb8f..9e19eb8f 100644
--- a/application/resources/instances/dirt.png
+++ b/application/resources/multimc/32x32/instances/dirt.png
Binary files differ
diff --git a/application/resources/instances/enderpearl.png b/application/resources/multimc/32x32/instances/enderpearl.png
index a818eb8e..a818eb8e 100644
--- a/application/resources/instances/enderpearl.png
+++ b/application/resources/multimc/32x32/instances/enderpearl.png
Binary files differ
diff --git a/application/resources/instances/ftb_glow.png b/application/resources/multimc/32x32/instances/ftb_glow.png
index c4e6fd5d..c4e6fd5d 100644
--- a/application/resources/instances/ftb_glow.png
+++ b/application/resources/multimc/32x32/instances/ftb_glow.png
Binary files differ
diff --git a/application/resources/instances/ftb_logo.png b/application/resources/multimc/32x32/instances/ftb_logo.png
index 20df7171..20df7171 100644
--- a/application/resources/instances/ftb_logo.png
+++ b/application/resources/multimc/32x32/instances/ftb_logo.png
Binary files differ
diff --git a/application/resources/instances/gear.png b/application/resources/multimc/32x32/instances/gear.png
index da9ba2f9..da9ba2f9 100644
--- a/application/resources/instances/gear.png
+++ b/application/resources/multimc/32x32/instances/gear.png
Binary files differ
diff --git a/application/resources/instances/gold.png b/application/resources/multimc/32x32/instances/gold.png
index 9bedda16..9bedda16 100644
--- a/application/resources/instances/gold.png
+++ b/application/resources/multimc/32x32/instances/gold.png
Binary files differ
diff --git a/application/resources/instances/grass.png b/application/resources/multimc/32x32/instances/grass.png
index f1694547..f1694547 100644
--- a/application/resources/instances/grass.png
+++ b/application/resources/multimc/32x32/instances/grass.png
Binary files differ
diff --git a/application/resources/instances/herobrine.png b/application/resources/multimc/32x32/instances/herobrine.png
index e5460da3..e5460da3 100644
--- a/application/resources/instances/herobrine.png
+++ b/application/resources/multimc/32x32/instances/herobrine.png
Binary files differ
diff --git a/application/resources/instances/infinity.png b/application/resources/multimc/32x32/instances/infinity.png
index bd94a3dc..bd94a3dc 100644
--- a/application/resources/instances/infinity.png
+++ b/application/resources/multimc/32x32/instances/infinity.png
Binary files differ
diff --git a/application/resources/instances/iron.png b/application/resources/multimc/32x32/instances/iron.png
index 28960782..28960782 100644
--- a/application/resources/instances/iron.png
+++ b/application/resources/multimc/32x32/instances/iron.png
Binary files differ
diff --git a/application/resources/instances/magitech.png b/application/resources/multimc/32x32/instances/magitech.png
index 6fd8ff60..6fd8ff60 100644
--- a/application/resources/instances/magitech.png
+++ b/application/resources/multimc/32x32/instances/magitech.png
Binary files differ
diff --git a/application/resources/instances/meat.png b/application/resources/multimc/32x32/instances/meat.png
index 6694859d..6694859d 100644
--- a/application/resources/instances/meat.png
+++ b/application/resources/multimc/32x32/instances/meat.png
Binary files differ
diff --git a/application/resources/instances/netherstar.png b/application/resources/multimc/32x32/instances/netherstar.png
index 43cb5113..43cb5113 100644
--- a/application/resources/instances/netherstar.png
+++ b/application/resources/multimc/32x32/instances/netherstar.png
Binary files differ
diff --git a/application/resources/instances/planks.png b/application/resources/multimc/32x32/instances/planks.png
index 7fcf8467..7fcf8467 100644
--- a/application/resources/instances/planks.png
+++ b/application/resources/multimc/32x32/instances/planks.png
Binary files differ
diff --git a/application/resources/instances/skeleton.png b/application/resources/multimc/32x32/instances/skeleton.png
index 0c8d3505..0c8d3505 100644
--- a/application/resources/instances/skeleton.png
+++ b/application/resources/multimc/32x32/instances/skeleton.png
Binary files differ
diff --git a/application/resources/instances/squarecreeper.png b/application/resources/multimc/32x32/instances/squarecreeper.png
index b78c4ae0..b78c4ae0 100644
--- a/application/resources/instances/squarecreeper.png
+++ b/application/resources/multimc/32x32/instances/squarecreeper.png
Binary files differ
diff --git a/application/resources/instances/steve.png b/application/resources/multimc/32x32/instances/steve.png
index 07c6acde..07c6acde 100644
--- a/application/resources/instances/steve.png
+++ b/application/resources/multimc/32x32/instances/steve.png
Binary files differ
diff --git a/application/resources/instances/stone.png b/application/resources/multimc/32x32/instances/stone.png
index 34f9a751..34f9a751 100644
--- a/application/resources/instances/stone.png
+++ b/application/resources/multimc/32x32/instances/stone.png
Binary files differ
diff --git a/application/resources/instances/tnt.png b/application/resources/multimc/32x32/instances/tnt.png
index e40d404d..e40d404d 100644
--- a/application/resources/instances/tnt.png
+++ b/application/resources/multimc/32x32/instances/tnt.png
Binary files differ
diff --git a/application/resources/instances/enderman.png b/application/resources/multimc/50x50/instances/enderman.png
index 9f3a72b3..9f3a72b3 100644
--- a/application/resources/instances/enderman.png
+++ b/application/resources/multimc/50x50/instances/enderman.png
Binary files differ
diff --git a/application/resources/multimc/index.theme b/application/resources/multimc/index.theme
index 5f7d3f3f..0fe7e7d7 100644
--- a/application/resources/multimc/index.theme
+++ b/application/resources/multimc/index.theme
@@ -2,14 +2,7 @@
Name=multimc
Comment=MultiMC Default Icons
Inherits=default
-Directories=scalable/apps,8x8,16x16,22x22,24x24,32x32,48x48,scalable
-
-[scalable/apps]
-Size=48
-Type=scalable
-MinSize=1
-MaxSize=512
-Context=Applications
+Directories=8x8,16x16,22x22,24x24,32x32,32x32/instances,48x48,50x50/instances,64x64,128x128/instances,256x256,scalable
[8x8]
Size=8
@@ -26,12 +19,25 @@ Size=24
[32x32]
Size=32
+[32x32/instances]
+Size=32
+MinSize=1
+MaxSize=32
+
[48x48]
Size=48
+[50x50/instances]
+Size=50
+
[64x64]
Size=64
+[128x128/instances]
+Size=128
+MinSize=33
+MaxSize=128
+
[256x256]
Size=256
diff --git a/application/resources/multimc/multimc.qrc b/application/resources/multimc/multimc.qrc
index 91e19065..ef3e9ab6 100644
--- a/application/resources/multimc/multimc.qrc
+++ b/application/resources/multimc/multimc.qrc
@@ -233,5 +233,59 @@
<!-- discord logo icon thing. from discord. traced from bitmap -->
<file>scalable/discord.svg</file>
- </qresource>
+ <!-- instance icons -->
+ <file>32x32/instances/chicken.png</file>
+ <file>128x128/instances/chicken.png</file>
+
+ <file>32x32/instances/creeper.png</file>
+ <file>128x128/instances/creeper.png</file>
+
+ <file>32x32/instances/enderpearl.png</file>
+ <file>128x128/instances/enderpearl.png</file>
+
+ <file>32x32/instances/ftb_glow.png</file>
+ <file>128x128/instances/ftb_glow.png</file>
+
+ <file>32x32/instances/ftb_logo.png</file>
+ <file>128x128/instances/ftb_logo.png</file>
+
+ <file>32x32/instances/gear.png</file>
+ <file>128x128/instances/gear.png</file>
+
+ <file>32x32/instances/herobrine.png</file>
+ <file>128x128/instances/herobrine.png</file>
+
+ <file>32x32/instances/infinity.png</file>
+ <file>128x128/instances/infinity.png</file>
+
+ <file>32x32/instances/magitech.png</file>
+ <file>128x128/instances/magitech.png</file>
+
+ <file>32x32/instances/meat.png</file>
+ <file>128x128/instances/meat.png</file>
+
+ <file>32x32/instances/netherstar.png</file>
+ <file>128x128/instances/netherstar.png</file>
+
+ <file>32x32/instances/skeleton.png</file>
+ <file>128x128/instances/skeleton.png</file>
+
+ <file>32x32/instances/squarecreeper.png</file>
+ <file>128x128/instances/squarecreeper.png</file>
+
+ <file>32x32/instances/steve.png</file>
+ <file>128x128/instances/steve.png</file>
+
+ <file>32x32/instances/brick.png</file>
+ <file>32x32/instances/diamond.png</file>
+ <file>32x32/instances/dirt.png</file>
+ <file>32x32/instances/gold.png</file>
+ <file>32x32/instances/grass.png</file>
+ <file>32x32/instances/iron.png</file>
+ <file>32x32/instances/planks.png</file>
+ <file>32x32/instances/stone.png</file>
+ <file>32x32/instances/tnt.png</file>
+
+ <file>50x50/instances/enderman.png</file>
+ </qresource>
</RCC>