summaryrefslogtreecommitdiffstats
path: root/logic/icons/IconList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/icons/IconList.cpp')
-rw-r--r--logic/icons/IconList.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/logic/icons/IconList.cpp b/logic/icons/IconList.cpp
index cda2db7b..d76e6fbb 100644
--- a/logic/icons/IconList.cpp
+++ b/logic/icons/IconList.cpp
@@ -336,6 +336,23 @@ QIcon IconList::getIcon(QString key)
return QIcon();
}
+QIcon IconList::getBigIcon(QString key)
+{
+ int icon_index = getIconIndex(key);
+
+ if (icon_index == -1)
+ key = "infinity";
+
+ // Fallback for icons that don't exist.
+ icon_index = getIconIndex(key);
+
+ if (icon_index == -1)
+ return QIcon();
+
+ QPixmap bigone = icons[icon_index].icon().pixmap(256,256).scaled(256,256);
+ return QIcon(bigone);
+}
+
int IconList::getIconIndex(QString key)
{
if (key == "default")