summaryrefslogtreecommitdiff
path: root/src/gui/shortcutcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/shortcutcontainer.cpp')
-rw-r--r--src/gui/shortcutcontainer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/shortcutcontainer.cpp b/src/gui/shortcutcontainer.cpp
index 50ec9d06..fcb33279 100644
--- a/src/gui/shortcutcontainer.cpp
+++ b/src/gui/shortcutcontainer.cpp
@@ -43,13 +43,12 @@ void ShortcutContainer::widgetResized(const gcn::Event &event)
if (mGridWidth < 1)
mGridWidth = 1;
+ setHeight((mMaxItems / mGridWidth) * mBoxHeight);
+
mGridHeight = getHeight() / mBoxHeight;
if (mGridHeight < 1)
mGridHeight = 1;
-
- setHeight((mMaxItems / mGridWidth +
- (mMaxItems % mGridWidth > 0 ? 1 : 0)) * mBoxHeight);
}
int ShortcutContainer::getIndexFromGrid(int pointX, int pointY) const