diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-25 22:27:32 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-08-05 17:16:58 +0200 |
commit | 542570896e1e0ce73ebfc442b48e741c2ea32377 (patch) | |
tree | 834b0f9c87d2aa73d22a004a103d8e615ee6d9ba /src/gui/statuswindow.cpp | |
parent | 1fe16bdda5fa0d7112f4568e7bcd892d01c197b9 (diff) | |
download | Mana-542570896e1e0ce73ebfc442b48e741c2ea32377.tar.gz Mana-542570896e1e0ce73ebfc442b48e741c2ea32377.tar.bz2 Mana-542570896e1e0ce73ebfc442b48e741c2ea32377.tar.xz Mana-542570896e1e0ce73ebfc442b48e741c2ea32377.zip |
Removed all the hardcoded sizes of the various setup tabs
Instead, support for dynamically adjusting layout was added to the
Container class.
Various other places were also adapted to use the new layout support in
Container.
Reviewed-by: Erik Schilling
Diffstat (limited to 'src/gui/statuswindow.cpp')
-rw-r--r-- | src/gui/statuswindow.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index ebd54f33..430d47ed 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -29,7 +29,7 @@ #include "gui/widgets/button.h" #include "gui/widgets/label.h" -#include "gui/widgets/layouthelper.h" +#include "gui/widgets/layout.h" #include "gui/widgets/progressbar.h" #include "gui/widgets/scrollarea.h" #include "gui/widgets/vertcontainer.h" @@ -65,7 +65,6 @@ class AttrDisplay : public Container const int mId; const std::string mName; - LayoutHelper *mLayout; Label *mLabel; Label *mValue; }; @@ -433,13 +432,10 @@ AttrDisplay::AttrDisplay(int id, const std::string &name): mLabel->setAlignment(Graphics::CENTER); mValue->setAlignment(Graphics::CENTER); - - mLayout = new LayoutHelper(this); } AttrDisplay::~AttrDisplay() { - delete mLayout; } std::string AttrDisplay::update() @@ -458,9 +454,6 @@ DerDisplay::DerDisplay(int id, const std::string &name): AttrDisplay(id, name) { // Do the layout - LayoutHelper h(this); - ContainerPlacer place = mLayout->getPlacer(0, 0); - place(0, 0, mLabel, 3); place(3, 0, mValue, 2); @@ -474,8 +467,6 @@ ChangeDisplay::ChangeDisplay(int id, const std::string &name): mInc = new Button(_("+"), "inc", this); // Do the layout - ContainerPlacer place = mLayout->getPlacer(0, 0); - place(0, 0, mLabel, 3); place(4, 0, mValue, 2); place(6, 0, mInc); |