summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/gui/itemcontainer.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6330ea3d..c8a18b96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
* src/gui/scrollarea.h, src/gui/scrollarea.cpp: Add methods to get
width and height adjusted for any visible scrollbars.
+ * src/gui/itemcontainer.cpp: Fix buildup of whitespace by using
+ correct gridHeight and adding just 4px space to bottom.
2008-04-27 Dennis Friis <peavey@placid.dk>
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index a6348d01..eb9d66ec 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -136,7 +136,7 @@ ItemContainer::setWidth(int width)
gcn::Widget::setWidth(width);
int gridWidth = 36; //item icon width + 4
- int gridHeight = 46; //item icon height + 14
+ int gridHeight = 42; //item icon height + 10
int columns = getWidth() / gridWidth;
if (columns < 1)
@@ -144,7 +144,7 @@ ItemContainer::setWidth(int width)
columns = 1;
}
- setHeight(((mMaxItems / columns) +
+ setHeight(4 + ((mMaxItems / columns) +
(mMaxItems % columns > 0 ? 1 : 0)) * gridHeight);
}