diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-19 15:22:57 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-19 15:29:51 +0200 |
commit | e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6 (patch) | |
tree | d2206a3544acfba5598df229b15e890b7450f1c8 /src/gui/trade.cpp | |
parent | 21d85f8726ad4a15702005247e5241a2056cbbc8 (diff) | |
download | mana-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.gz mana-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.bz2 mana-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.xz mana-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.zip |
Made ItemContainer wrap items depending on its width again
This is instead of taking a fixed number of rows and columns. The
inventory and trade window are now resizable again.
Other smaller changes:
* Don't use bold font for the labels in the item container
* Changed "(Eq)" back to "Eq."
* Removed the ugly grid lines
Diffstat (limited to 'src/gui/trade.cpp')
-rw-r--r-- | src/gui/trade.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index 899c55d5..c67b0b7b 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -59,9 +59,11 @@ TradeWindow::TradeWindow(): mStatus(PROPOSING) { setWindowName("Trade"); - setResizable(false); + setResizable(true); setCloseButton(true); setDefaultSize(386, 180, ImageRect::CENTER); + setMinWidth(386); + setMinHeight(180); std::string longestName = getFont()->getWidth(_("OK")) > getFont()->getWidth(_("Trade")) ? @@ -76,15 +78,17 @@ TradeWindow::TradeWindow(): mOkButton->setWidth(8 + width); - mMyItemContainer = new ItemContainer(mMyInventory.get(), 5, 2); + mMyItemContainer = new ItemContainer(mMyInventory.get()); mMyItemContainer->addSelectionListener(this); ScrollArea *myScroll = new ScrollArea(mMyItemContainer); + myScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); - mPartnerItemContainer = new ItemContainer(mPartnerInventory.get(), 5, 2); + mPartnerItemContainer = new ItemContainer(mPartnerInventory.get()); mPartnerItemContainer->addSelectionListener(this); ScrollArea *partnerScroll = new ScrollArea(mPartnerItemContainer); + partnerScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mMoneyLabel = new Label(strprintf(_("You get %s."), "")); gcn::Label *mMoneyLabel2 = new Label(_("You give:")); |