diff options
Diffstat (limited to 'src/gui/shortcutwindow.cpp')
-rw-r--r-- | src/gui/shortcutwindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index d2aa2c2c..eb9efa84 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -25,14 +25,13 @@ static const int SCROLL_PADDING = 0; -ShortcutWindow::ShortcutWindow(const char * title,ShortcutContainer *content) +ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) { setWindowName(title); // no title presented, title bar is padding so window can be moved. gcn::Window::setTitleBarHeight(gcn::Window::getPadding()); setShowTitle(false); setResizable(true); - setDefaultSize(758, 174, 42, 426); mItems = content; @@ -42,6 +41,9 @@ ShortcutWindow::ShortcutWindow(const char * title,ShortcutContainer *content) setMaxWidth(mItems->getBoxWidth() * mItems->getMaxItems() + border); setMaxHeight(mItems->getBoxHeight() * mItems->getMaxItems() + border); + setDefaultSize(758, 174, mItems->getBoxWidth() + border, + (mItems->getBoxHeight() * mItems->getMaxItems()) + border); + mScrollArea = new ScrollArea(mItems); mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING); mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); |