summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-04-27 22:45:03 +0000
committerDennis Friis <peavey@placid.dk>2008-04-27 22:45:03 +0000
commit8dabd7f5160346c8670ae95f7e713b6156e5fc48 (patch)
tree3b4d1ec86380a558e4e79d0505cfbcea41ba40bd
parent044151cee3dc6a65ba21f93db331844d6c8f3974 (diff)
downloadmana-8dabd7f5160346c8670ae95f7e713b6156e5fc48.tar.gz
mana-8dabd7f5160346c8670ae95f7e713b6156e5fc48.tar.bz2
mana-8dabd7f5160346c8670ae95f7e713b6156e5fc48.tar.xz
mana-8dabd7f5160346c8670ae95f7e713b6156e5fc48.zip
Fix buildup of whitespace by using correct gridHeight and adding just 4px space to bottom.
-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);
}