state the debris scrap value with the item icon, not the word

This commit is contained in:
2026-08-12 21:21:47 +02:00
parent 28656bea7e
commit 7e670fc01c
12 changed files with 126 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
#include "ItemIconCache.h"
#include <QFile>
#include <QFontMetrics>
#include <QPainter>
#include <QRectF>
#include <QSvgRenderer>
@@ -94,6 +95,12 @@ QPixmap ItemIconCache::getPixmap(const std::string& itemId, int sizePx)
return getPixmap(itemId, itemId, sizePx, false);
}
QPixmap ItemIconCache::getInlineIcon(const std::string& itemId, const QFont& font)
{
if (!hasIcon(itemId)) { return QPixmap(); }
return getPixmap(itemId, QFontMetrics(font).height());
}
QPixmap ItemIconCache::getPixmap(const std::string& cacheKey, const std::string& itemId,
int sizePx, bool withSquare)
{