diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/gui/itemcontainer.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -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); } |