summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-28 20:31:36 -0700
committerIra Rice <irarice@gmail.com>2009-01-28 20:31:36 -0700
commit0e2a2f39a2137ea1caae96256431c7d35fc2e6ec (patch)
tree8369d486ab948fd3f97354afeafb555aa12b5439 /src
parent63886946dceb5e3a4345810d35327e9767cba913 (diff)
downloadmana-0e2a2f39a2137ea1caae96256431c7d35fc2e6ec.tar.gz
mana-0e2a2f39a2137ea1caae96256431c7d35fc2e6ec.tar.bz2
mana-0e2a2f39a2137ea1caae96256431c7d35fc2e6ec.tar.xz
mana-0e2a2f39a2137ea1caae96256431c7d35fc2e6ec.zip
Fixed a slight error in item name widths.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/itempopup.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 1256275d..402f9e05 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -47,10 +47,8 @@ ItemPopup::ItemPopup():
// Item Name
mItemName = new gcn::Label("Label");
- mItemName->setFont(gui->getFont());
- mItemName->setPosition(2, 2);
- mItemName->setWidth(getWidth() - 4);
mItemName->setFont(boldFont);
+ mItemName->setPosition(2, 2);
// Item Description
mItemDesc = new TextBox();
@@ -99,6 +97,7 @@ ItemPopup::ItemPopup():
void ItemPopup::setItem(const ItemInfo &item)
{
mItemName->setCaption(item.getName());
+ mItemName->setWidth(boldFont->getWidth(item.getName()));
mItemDesc->setTextWrapped(item.getDescription(), 196);
mItemEffect->setTextWrapped(item.getEffect(), 196);
mItemWeight->setTextWrapped(_("Weight: ") + toString(item.getWeight()) +