diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/shortcutwindow.cpp | 13 | ||||
-rw-r--r-- | src/gui/shortcutwindow.h | 2 |
2 files changed, 11 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(); diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h index 2711ced5..64592328 100644 --- a/src/gui/shortcutwindow.h +++ b/src/gui/shortcutwindow.h @@ -55,6 +55,8 @@ class ShortcutWindow : public Window ShortcutContainer *mItems; ScrollArea *mScrollArea; + + static int mInstances; }; extern ShortcutWindow *itemShortcutWindow; |