summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/itempopup.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 1aa61f5b..2a45a06a 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -103,20 +103,21 @@ void ItemPopup::setItem(const ItemInfo &item)
const int numRowsDesc = mItemDesc->getNumberOfRows();
const int numRowsEffect = mItemEffect->getNumberOfRows();
- //const int numRowsWeight = mItemWeight->getNumberOfRows();
+ const int numRowsWeight = mItemWeight->getNumberOfRows();
const int height = getFont()->getHeight();
if (item.getEffect().empty())
{
- setContentSize(minWidth, (numRowsDesc + 3) * height);
+ setContentSize(minWidth, (numRowsDesc + numRowsWeight + getPadding()) *
+ height);
mItemWeight->setPosition(getPadding(), (numRowsDesc + getPadding()) *
height);
}
else
{
- setContentSize(minWidth, (numRowsDesc + numRowsEffect + getPadding()) *
- height);
+ setContentSize(minWidth, (numRowsDesc + numRowsEffect + numRowsWeight +
+ getPadding()) * height);
mItemWeight->setPosition(getPadding(), (numRowsDesc + numRowsEffect +
getPadding()) * height);