diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/shortcutwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index dd8634f7..5d49a3c6 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -27,7 +27,7 @@ static const int SCROLL_PADDING = 0; -int ShortcutWindow::mInstances = 1; +int ShortcutWindow::mInstances = 0; ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) { @@ -39,6 +39,8 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) mItems = content; + mInstances++; + const int border = SCROLL_PADDING * 2 + getPadding() * 2; setMinWidth(mItems->getBoxWidth() + border); setMinHeight(mItems->getBoxHeight() + border); @@ -59,8 +61,6 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mScrollArea->setOpaque(false); - mInstances++; - add(mScrollArea); loadWindowState(); |