ask the icon cache for the inline block icon

This commit is contained in:
2026-08-12 21:22:40 +02:00
parent 7e670fc01c
commit b6b6acb99c
4 changed files with 4 additions and 21 deletions

View File

@@ -175,9 +175,7 @@ BuildButtonBar::BuildButtonBar(Simulation* sim, const GameConfig* config,
// Block icon shown to the right of each button's cost (REQ-UI-BUILD-COST); null
// when no building_block icon exists, in which case the cost is the bare number.
const QPixmap blockIcon = m_itemIcons->hasIcon(kBlockItemId)
? m_itemIcons->getPixmap(kBlockItemId, QFontMetrics(font()).height())
: QPixmap();
const QPixmap blockIcon = m_itemIcons->getInlineIcon(kBlockItemId, font());
for (const BuildingDef& def : config->buildings.buildings)
{