summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.cpp
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-04-21 08:48:15 -0600
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-29 20:13:38 +0200
commitc2697fef772f84db637f55b7501361ea94ed66ee (patch)
treee4b9fb8b33d870b05fbb212bd039555ed5c60503 /src/gui/itempopup.cpp
parentd2fa27a7c7c34c12de51e478977d495824228d8b (diff)
downloadmana-c2697fef772f84db637f55b7501361ea94ed66ee.tar.gz
mana-c2697fef772f84db637f55b7501361ea94ed66ee.tar.bz2
mana-c2697fef772f84db637f55b7501361ea94ed66ee.tar.xz
mana-c2697fef772f84db637f55b7501361ea94ed66ee.zip
Allow item popups to run off of the top of the screen, as requested, as
well as fixing the item weight field not showing. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl> (partial cherry-pick)
Diffstat (limited to 'src/gui/itempopup.cpp')
-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);