summaryrefslogtreecommitdiff
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
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>
-rw-r--r--src/gui/setup_keyboard.cpp19
-rw-r--r--src/gui/setup_video.cpp2
2 files changed, 13 insertions, 8 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()
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index f4bcbe31..16a7172f 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -268,7 +268,7 @@ Setup_Video::Setup_Video():
place(2, 11, mOverlayDetailField, 2).setPadding(2);
place(2, 12, mParticleDetailField, 2).setPadding(2);
- setDimension(gcn::Rectangle(0, 0, 295, 255));
+ setDimension(gcn::Rectangle(0, 0, 295, 250));
}
Setup_Video::~Setup_Video()