From 86d441913287287baa56d6d262be9ee519840e96 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Sun, 27 Apr 2008 22:51:58 +0000 Subject: Switch to use our extended ScrollArea and use adjusted width to proper calculate the grid for itemcontainer. --- src/gui/inventorywindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/inventorywindow.cpp') diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 91b1ce7c..a5460f1d 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -96,6 +96,8 @@ void InventoryWindow::logic() mWeightLabel->setCaption( "Total Weight: " + toString(player_node->mTotalWeight) + " - " "Maximum Weight: " + toString(player_node->mMaxWeight)); + + mItems->setWidth(mInvenScroll->getAdjustedWidth()); } void InventoryWindow::action(const gcn::ActionEvent &event) @@ -203,7 +205,7 @@ void InventoryWindow::widgetResized(const gcn::Event &event) mInvenScroll->setSize(width - 16, mItemDescriptionLabel->getY() - mWeightLabel->getHeight() - 18); - mItems->setWidth(width - 16); + mItems->setWidth(mInvenScroll->getAdjustedWidth()); mWeightLabel->setWidth(width - 16); } -- cgit v1.2.3-70-g09d2