From c2697fef772f84db637f55b7501361ea94ed66ee Mon Sep 17 00:00:00 2001 From: Tametomo Date: Tue, 21 Apr 2009 08:48:15 -0600 Subject: Allow item popups to run off of the top of the screen, as requested, as well as fixing the item weight field not showing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tametomo Signed-off-by: Bjørn Lindeijer (partial cherry-pick) --- src/gui/itempopup.cpp | 9 +++++---- 1 file 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); -- cgit v1.2.3-70-g09d2