summaryrefslogtreecommitdiff
path: root/src/gui
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
parente5ec83786f01d91da97f75f68ccc707c37780db4 (diff)
downloadmana-6de59c31669657957c6d795c149f3acedf34075b.tar.gz
mana-6de59c31669657957c6d795c149f3acedf34075b.tar.bz2
mana-6de59c31669657957c6d795c149f3acedf34075b.tar.xz
mana-6de59c31669657957c6d795c149f3acedf34075b.zip
Applied patch from TMW-Mantis #972: The shortcut windows are not placed correctly.
Patch from BinaryMind.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/shortcutwindow.cpp10
-rw-r--r--src/gui/shortcutwindow.h2
2 files changed, 6 insertions, 6 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);
diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h
index e30ab18a..35e746f8 100644
--- a/src/gui/shortcutwindow.h
+++ b/src/gui/shortcutwindow.h
@@ -51,7 +51,7 @@ class ShortcutWindow : public Window
ScrollArea *mScrollArea;
- static int mInstances;
+ static int mBoxesWidth;
};
extern ShortcutWindow *itemShortcutWindow;