diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-19 20:25:19 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-19 20:25:46 +0100 |
commit | ec7fcc9e2029b9b57acb5bfae25faa7b95e19412 (patch) | |
tree | 493def658583dbdc0ea9ef31cc412f3ce6e096a1 | |
parent | 5f851ea2da429954c438712de80d50fe27d80aa8 (diff) | |
download | mana-client-ec7fcc9e2029b9b57acb5bfae25faa7b95e19412.tar.gz mana-client-ec7fcc9e2029b9b57acb5bfae25faa7b95e19412.tar.bz2 mana-client-ec7fcc9e2029b9b57acb5bfae25faa7b95e19412.tar.xz mana-client-ec7fcc9e2029b9b57acb5bfae25faa7b95e19412.zip |
Reflowed the setup keyboard tab with the layout code.
Signed-off-by: Ira Rice <irarice@gmail.com>
(cherry picked from commit 8f28b18a31fc8415fbf6aedc5106b8b8525f4caf)
Conflicts:
src/gui/setup_keyboard.cpp
src/gui/setup_video.cpp
-rw-r--r-- | src/gui/setup_keyboard.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp index e4d1af0c..af6bebae 100644 --- a/src/gui/setup_keyboard.cpp +++ b/src/gui/setup_keyboard.cpp @@ -29,6 +29,8 @@ #include "ok_dialog.h" #include "scrollarea.h" +#include "widgets/layouthelper.h" + #include "../configuration.h" #include "../keyboardconfig.h" @@ -74,7 +76,6 @@ Setup_Keyboard::Setup_Keyboard(): { keyboard.setSetupKeyboard(this); setOpaque(false); - setDimension(gcn::Rectangle(0, 0, 250, 200)); refreshKeys(); @@ -83,19 +84,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, 250, 200)); } Setup_Keyboard::~Setup_Keyboard() |