summaryrefslogtreecommitdiff
path: root/src/gui/shortcutwindow.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-02-04 17:43:48 +0100
committerBertram <bertram@cegetel.net>2010-02-04 17:43:48 +0100
commit6de59c31669657957c6d795c149f3acedf34075b (patch)
tree3af2420d7e35b5afa04d8ed771792dd6312537e5 /src/gui/shortcutwindow.cpp
parente5ec83786f01d91da97f75f68ccc707c37780db4 (diff)
downloadmana-client-6de59c31669657957c6d795c149f3acedf34075b.tar.gz
mana-client-6de59c31669657957c6d795c149f3acedf34075b.tar.bz2
mana-client-6de59c31669657957c6d795c149f3acedf34075b.tar.xz
mana-client-6de59c31669657957c6d795c149f3acedf34075b.zip
Applied patch from TMW-Mantis #972: The shortcut windows are not placed correctly.
Patch from BinaryMind.
Diffstat (limited to 'src/gui/shortcutwindow.cpp')
-rw-r--r--src/gui/shortcutwindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index 44feddfa..b84e4c27 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -31,7 +31,7 @@
static const int SCROLL_PADDING = 0;
-int ShortcutWindow::mInstances = 0;
+int ShortcutWindow::mBoxesWidth = 0;
ShortcutWindow::ShortcutWindow(const std::string &title,
ShortcutContainer *content)
@@ -53,11 +53,11 @@ ShortcutWindow::ShortcutWindow(const std::string &title,
setMaxWidth(mItems->getBoxWidth() * mItems->getMaxItems() + border);
setMaxHeight(mItems->getBoxHeight() * mItems->getMaxItems() + border);
- setDefaultSize(mItems->getBoxWidth() + border, (mItems->getBoxHeight() *
- mItems->getMaxItems()) + border, ImageRect::LOWER_RIGHT,
- mInstances * mItems->getBoxWidth(), 0);
+ setDefaultSize(mItems->getBoxWidth() + border, mItems->getBoxHeight() *
+ mItems->getMaxItems() + border, ImageRect::LOWER_RIGHT,
+ mBoxesWidth, 0);
- mInstances++;
+ mBoxesWidth += mItems->getBoxWidth() + border;
mScrollArea = new ScrollArea(mItems);
mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING);