summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
commitef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch)
treec3d7c79fca18ac387d0c90512ef3201c92da5890 /src/gui/widgets/window.cpp
parent22b64d16b613c1e5b26632237879b167024788ab (diff)
downloadmv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip
Move some variables to better scope.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 9d9385f8d..b192bad35 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -642,8 +642,6 @@ void Window::setResizable(const bool r)
void Window::widgetResized(const Event &event A_UNUSED)
{
- const Rect area = getChildrenArea();
-
if (mGrip != nullptr)
{
mGripRect.x = mDimension.width - mGrip->getWidth() - mGripPadding;
@@ -652,6 +650,7 @@ void Window::widgetResized(const Event &event A_UNUSED)
if (mLayout != nullptr)
{
+ const Rect area = getChildrenArea();
int w = area.width;
int h = area.height;
mLayout->reflow(w, h);