From 640b37b66712d22afd5c453f6aebc4abf7dcd442 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 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); } } -- cgit v1.2.3-70-g09d2