summaryrefslogtreecommitdiff
path: root/src/gui/setup_keyboard.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-18 22:47:39 -0700
committerIra Rice <irarice@gmail.com>2009-01-18 22:47:39 -0700
commit8f28b18a31fc8415fbf6aedc5106b8b8525f4caf (patch)
tree2db05c20cf4028519ca022008104c53bb79eb2e1 /src/gui/setup_keyboard.cpp
parent7c13d69ed3739668bff47728a8976131cd00d5a4 (diff)
downloadmana-8f28b18a31fc8415fbf6aedc5106b8b8525f4caf.tar.gz
mana-8f28b18a31fc8415fbf6aedc5106b8b8525f4caf.tar.bz2
mana-8f28b18a31fc8415fbf6aedc5106b8b8525f4caf.tar.xz
mana-8f28b18a31fc8415fbf6aedc5106b8b8525f4caf.zip
Reflowed the setup keyboard tab with the layout code.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/setup_keyboard.cpp')
-rw-r--r--src/gui/setup_keyboard.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp
index 24d12049..83c556a2 100644
--- a/src/gui/setup_keyboard.cpp
+++ b/src/gui/setup_keyboard.cpp
@@ -30,6 +30,8 @@
#include "scrollarea.h"
#include "setup_keyboard.h"
+#include "widgets/layouthelper.h"
+
#include "../configuration.h"
#include "../keyboardconfig.h"
@@ -73,7 +75,6 @@ Setup_Keyboard::Setup_Keyboard():
{
keyboard.setSetupKeyboard(this);
setOpaque(false);
- setDimension(gcn::Rectangle(0, 0, 290, 255));
refreshKeys();
@@ -82,19 +83,23 @@ Setup_Keyboard::Setup_Keyboard():
mKeyList->setSelected(-1);
ScrollArea *scrollArea = new ScrollArea(mKeyList);
- scrollArea->setDimension(gcn::Rectangle(10, 10, 200, 140));
- add(scrollArea);
mAssignKeyButton = new Button(_("Assign"), "assign", this);
- mAssignKeyButton->setPosition(165, 155);
mAssignKeyButton->addActionListener(this);
mAssignKeyButton->setEnabled(false);
- add(mAssignKeyButton);
mMakeDefaultButton = new Button(_("Default"), "makeDefault", this);
- mMakeDefaultButton->setPosition(10, 155);
mMakeDefaultButton->addActionListener(this);
- add(mMakeDefaultButton);
+
+ // Do the layout
+ LayoutHelper h(this);
+ ContainerPlacer place = h.getPlacer(0, 0);
+
+ place(0, 0, scrollArea, 4, 6).setPadding(2);
+ place(0, 6, mMakeDefaultButton);
+ place(3, 6, mAssignKeyButton);
+
+ setDimension(gcn::Rectangle(0, 0, 295, 250));
}
Setup_Keyboard::~Setup_Keyboard()