summaryrefslogtreecommitdiff
path: root/src/gui/itemshortcutwindow.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-12 18:36:15 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-12 18:36:15 +0000
commit8c62978f845432f8cac046a0d6fd4587c087f22f (patch)
tree1f586624c7f3a5ea375777606c035622026d8c5b /src/gui/itemshortcutwindow.cpp
parentb50649ee5e28511df72cc3a08023747727c5b6f0 (diff)
downloadmana-8c62978f845432f8cac046a0d6fd4587c087f22f.tar.gz
mana-8c62978f845432f8cac046a0d6fd4587c087f22f.tar.bz2
mana-8c62978f845432f8cac046a0d6fd4587c087f22f.tar.xz
mana-8c62978f845432f8cac046a0d6fd4587c087f22f.zip
Fixed display of item shortcut container. gcn::Widget::setWidth is no longer
virtual.
Diffstat (limited to 'src/gui/itemshortcutwindow.cpp')
-rw-r--r--src/gui/itemshortcutwindow.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/itemshortcutwindow.cpp b/src/gui/itemshortcutwindow.cpp
index efbbe266..3724516a 100644
--- a/src/gui/itemshortcutwindow.cpp
+++ b/src/gui/itemshortcutwindow.cpp
@@ -45,11 +45,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();
}
@@ -57,12 +58,7 @@ ItemShortcutWindow::ItemShortcutWindow()
ItemShortcutWindow::~ItemShortcutWindow()
{
delete mItems;
- delete mInvenScroll;
-}
-
-void ItemShortcutWindow::logic()
-{
- Window::logic();
+ delete mScrollArea;
}
void ItemShortcutWindow::widgetResized(const gcn::Event &event)
@@ -71,7 +67,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);
}