diff options
Diffstat (limited to 'src/gui/itemshortcutwindow.cpp')
-rw-r--r-- | src/gui/itemshortcutwindow.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/itemshortcutwindow.cpp b/src/gui/itemshortcutwindow.cpp index c7b2bd05..fb75e20d 100644 --- a/src/gui/itemshortcutwindow.cpp +++ b/src/gui/itemshortcutwindow.cpp @@ -44,11 +44,12 @@ ItemShortcutWindow::ItemShortcutWindow() setMaxWidth(mItems->getBoxWidth() * mItems->getMaxItems() + border); setMaxHeight(mItems->getBoxHeight() * mItems->getMaxItems() + border); - mInvenScroll = new ScrollArea(mItems); - mInvenScroll->setPosition(SCROLL_PADDING, SCROLL_PADDING); - mInvenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); + mScrollArea = new ScrollArea(mItems); + mScrollArea->setPosition(SCROLL_PADDING, SCROLL_PADDING); + mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); + mScrollArea->setOpaque(false); - add(mInvenScroll); + add(mScrollArea); loadWindowState("ItemShortcut"); } @@ -56,12 +57,7 @@ ItemShortcutWindow::ItemShortcutWindow() ItemShortcutWindow::~ItemShortcutWindow() { delete mItems; - delete mInvenScroll; -} - -void ItemShortcutWindow::logic() -{ - Window::logic(); + delete mScrollArea; } void ItemShortcutWindow::widgetResized(const gcn::Event &event) @@ -70,7 +66,7 @@ void ItemShortcutWindow::widgetResized(const gcn::Event &event) const gcn::Rectangle &area = getChildrenArea(); - mInvenScroll->setSize( + mScrollArea->setSize( area.width - SCROLL_PADDING, area.height - SCROLL_PADDING); } |