summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;