diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-15 22:58:07 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-15 22:58:07 -0700 |
commit | ecc18d3a2ed44d4b4e6ccfe879771686b2616bb4 (patch) | |
tree | 9fd6afb73c8478311bd3d55d519467d8122f5c64 /src/gui/itempopup.cpp | |
parent | 600e10515e127d6393f0756cb72e5a63303557a2 (diff) | |
download | mana-ecc18d3a2ed44d4b4e6ccfe879771686b2616bb4.tar.gz mana-ecc18d3a2ed44d4b4e6ccfe879771686b2616bb4.tar.bz2 mana-ecc18d3a2ed44d4b4e6ccfe879771686b2616bb4.tar.xz mana-ecc18d3a2ed44d4b4e6ccfe879771686b2616bb4.zip |
A little bit of code cleanup/simplification.
TODO: Figure out how the itempopup transparency is broken and fix it
(broken on code import). Best guess would be that the window is attached
to a widget which is then attached to a window, causing a break in
updates to the transparency code.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r-- | src/gui/itempopup.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index 1402a148..a0df3eed 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -20,23 +20,24 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "itempopup.h" #include <guichan/widgets/label.hpp> -#include "widgets/layout.h" #include "gui.h" +#include "itempopup.h" + +#include "widgets/layout.h" #include "../resources/image.h" -#include "../resources/resourcemanager.h" #include "../resources/iteminfo.h" +#include "../resources/resourcemanager.h" + #include "../utils/gettext.h" #include "../utils/strprintf.h" - ItemPopup::ItemPopup() { setResizable(false); - setCaption(""); + setShowTitle(false); setTitleBarHeight(0); loadSkin("graphics/gui/gui.xml"); @@ -49,7 +50,6 @@ ItemPopup::ItemPopup() // Item Description mItemDesc = new TextBox(); mItemDesc->setEditable(false); - mItemDesc->setMinWidth(170); mItemDescScroll = new ScrollArea(mItemDesc); mItemDescScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); @@ -61,7 +61,6 @@ ItemPopup::ItemPopup() // Item Effect mItemEffect = new TextBox(); mItemEffect->setEditable(false); - mItemEffect->setMinWidth(170); mItemEffectScroll = new ScrollArea(mItemEffect); mItemEffectScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); @@ -88,8 +87,8 @@ void ItemPopup::setItem(const ItemInfo &item) const gcn::Rectangle &area = getChildrenArea(); const int width = area.width; - mItemDesc->setMinWidth(width - 30); - mItemEffect->setMinWidth(width - 30); + mItemDesc->setMinWidth(width - 10); + mItemEffect->setMinWidth(width - 10); mItemName->setCaption(item.getName()); mItemDesc->setTextWrapped(item.getDescription()); |