diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-14 22:20:12 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-14 22:20:12 -0600 |
commit | ebd128d47a3bcdf0b0bc03f179c4365c7c23a084 (patch) | |
tree | 784d3e1b799ba59a6335391aaba17a11fb5de678 /src | |
parent | a9a1ed080289185cc5e71a127d7fdf35c920de8a (diff) | |
download | mana-client-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.tar.gz mana-client-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.tar.bz2 mana-client-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.tar.xz mana-client-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.zip |
Removed a redundant widget resize function in the shortcut window.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/shortcutwindow.cpp | 18 | ||||
-rw-r--r-- | src/gui/shortcutwindow.h | 5 |
2 files changed, 7 insertions, 16 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp index c2df1f9c..8342465a 100644 --- a/src/gui/shortcutwindow.cpp +++ b/src/gui/shortcutwindow.cpp @@ -24,6 +24,8 @@ #include "shortcutcontainer.h" #include "shortcutwindow.h" +#include "widgets/layout.h" + #include "../configuration.h" static const int SCROLL_PADDING = 0; @@ -57,7 +59,11 @@ ShortcutWindow::ShortcutWindow(const char *title, ShortcutContainer *content) mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mScrollArea->setOpaque(false); - add(mScrollArea); + place(0, 0, mScrollArea, 5, 5).setPadding(0); + + Layout &layout = getLayout(); + layout.setRowHeight(0, Layout::AUTO_SET); + layout.setMargin(0); loadWindowState(); } @@ -67,13 +73,3 @@ ShortcutWindow::~ShortcutWindow() delete mItems; } -void ShortcutWindow::widgetResized(const gcn::Event &event) -{ - Window::widgetResized(event); - - const gcn::Rectangle &area = getChildrenArea(); - - mScrollArea->setSize( - area.width - SCROLL_PADDING, - area.height - SCROLL_PADDING); -} diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h index 42077d9c..d79fffd2 100644 --- a/src/gui/shortcutwindow.h +++ b/src/gui/shortcutwindow.h @@ -46,11 +46,6 @@ class ShortcutWindow : public Window */ ~ShortcutWindow(); - /** - * Called whenever the widget changes size. - */ - void widgetResized(const gcn::Event &event); - private: ShortcutWindow(); ShortcutContainer *mItems; |