summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-14 22:20:12 -0600
committerIra Rice <irarice@gmail.com>2009-03-14 22:20:12 -0600
commitebd128d47a3bcdf0b0bc03f179c4365c7c23a084 (patch)
tree784d3e1b799ba59a6335391aaba17a11fb5de678 /src/gui
parenta9a1ed080289185cc5e71a127d7fdf35c920de8a (diff)
downloadmana-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.tar.gz
mana-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.tar.bz2
mana-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.tar.xz
mana-ebd128d47a3bcdf0b0bc03f179c4365c7c23a084.zip
Removed a redundant widget resize function in the shortcut window.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/shortcutwindow.cpp18
-rw-r--r--src/gui/shortcutwindow.h5
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;