summaryrefslogtreecommitdiff
path: root/src/gui/shortcutwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/shortcutwindow.cpp')
-rw-r--r--src/gui/shortcutwindow.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index 91b33b72..dd8634f7 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -27,6 +27,8 @@
static const int SCROLL_PADDING = 0;
+int ShortcutWindow::mInstances = 1;
+
ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content)
{
setWindowName(title);
@@ -46,16 +48,19 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content)
const int width = (int) config.getValue("screenwidth", 800);
const int height = (int) config.getValue("screenheight", 600);
- setDefaultSize(width - mItems->getBoxWidth() - border,
- height - (mItems->getBoxHeight() * mItems->getMaxItems()) -
- border, mItems->getBoxWidth() + border,
- (mItems->getBoxHeight() * mItems->getMaxItems()) + border);
+ setDefaultSize(width - (mInstances * mItems->getBoxWidth()) -
+ (mInstances * border), height - (mItems->getBoxHeight() *
+ mItems->getMaxItems()) - border, mItems->getBoxWidth() +
+ border, (mItems->getBoxHeight() * mItems->getMaxItems()) +
+ border);
mScrollArea = new ScrollArea(mItems);
mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING);
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mScrollArea->setOpaque(false);
+ mInstances++;
+
add(mScrollArea);
loadWindowState();