diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-03-29 18:33:44 +0200 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-03-29 18:33:44 +0200 |
commit | 9587fb9b86ee4081ba14d23c1133bf1a09ee4578 (patch) | |
tree | 7682df3ec17534be553caae85ffa9e5a68c9a815 /src/gui/shortcutcontainer.cpp | |
parent | 63b41440a0555c6b39141eab94ef4627f712b476 (diff) | |
parent | 8748f26234bba1e71bbe059147fb02256f8cec2a (diff) | |
download | mana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.gz mana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.bz2 mana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.xz mana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.zip |
Merge branch 'master' of git@gitorious.org:tmw/mainline
Diffstat (limited to 'src/gui/shortcutcontainer.cpp')
-rw-r--r-- | src/gui/shortcutcontainer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/shortcutcontainer.cpp b/src/gui/shortcutcontainer.cpp index 9067e921..228a484e 100644 --- a/src/gui/shortcutcontainer.cpp +++ b/src/gui/shortcutcontainer.cpp @@ -42,12 +42,12 @@ void ShortcutContainer::widgetResized(const gcn::Event &event) if (mGridWidth < 1) mGridWidth = 1; - setHeight((mMaxItems / mGridWidth) * mBoxHeight); + mGridHeight = mMaxItems / mGridWidth; - mGridHeight = getHeight() / mBoxHeight; + if (mMaxItems % mGridWidth != 0 || mGridHeight < 1) + ++mGridHeight; - if (mGridHeight < 1) - mGridHeight = 1; + setHeight(mGridHeight * mBoxHeight); } int ShortcutContainer::getIndexFromGrid(int pointX, int pointY) const |