diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-18 23:29:48 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-18 16:09:53 -0700 |
commit | 640b37b66712d22afd5c453f6aebc4abf7dcd442 (patch) | |
tree | a2c00b2ace9c8e146ef3433916da449d396e34b0 /src/gui/window.cpp | |
parent | 7b38f31192be70463cfa1fa6f0ffe13181fc26a9 (diff) | |
download | mana-640b37b66712d22afd5c453f6aebc4abf7dcd442.tar.gz mana-640b37b66712d22afd5c453f6aebc4abf7dcd442.tar.bz2 mana-640b37b66712d22afd5c453f6aebc4abf7dcd442.tar.xz mana-640b37b66712d22afd5c453f6aebc4abf7dcd442.zip |
Fixed layout of video setup page when translated
Introduced a LayoutHelper class which can be used for any non-Window
container where you want to use a layout to place child widgets.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index f6f5f4b8..d1ada53d 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -257,17 +257,16 @@ void Window::setResizable(bool r) void Window::widgetResized(const gcn::Event &event) { + const gcn::Rectangle area = getChildrenArea(); + if (mGrip) - { - const gcn::Rectangle area = getChildrenArea(); mGrip->setPosition(getWidth() - mGrip->getWidth() - area.x, getHeight() - mGrip->getHeight() - area.y); - } if (mLayout) { - int w = getWidth() - 2 * getPadding(); - int h = getHeight() - getPadding() - getTitleBarHeight(); + int w = area.width; + int h = area.height; mLayout->reflow(w, h); } } |