From 9e29e1fd328304c2852c456e38fcb5da6421be96 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 18 Jan 2009 23:29:48 +0100 Subject: 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. --- src/gui/window.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/gui/window.cpp') 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); } } -- cgit v1.2.3-70-g09d2