diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/setup_keyboard.cpp | 19 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 2 |
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() |