summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-18 23:29:48 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-18 23:33:30 +0100
commit9e29e1fd328304c2852c456e38fcb5da6421be96 (patch)
tree42bcfa14290fbf9c8f01d8f48254f1c229c5f03e /src/gui/window.cpp
parenta10cebb21bdd211716628039b406362f2168c852 (diff)
downloadmana-9e29e1fd328304c2852c456e38fcb5da6421be96.tar.gz
mana-9e29e1fd328304c2852c456e38fcb5da6421be96.tar.bz2
mana-9e29e1fd328304c2852c456e38fcb5da6421be96.tar.xz
mana-9e29e1fd328304c2852c456e38fcb5da6421be96.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.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index dfe7ac64..a3864431 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -261,17 +261,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);
}
}