From 804228929166201a5b581dc52ddb91741e9b2a47 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Sat, 16 Aug 2014 19:48:47 +0200 Subject: [PATCH] WindowVX: Fix window resizing from big to small --- src/windowvx.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/windowvx.cpp b/src/windowvx.cpp index 1934fe9..207036a 100644 --- a/src/windowvx.cpp +++ b/src/windowvx.cpp @@ -256,6 +256,7 @@ struct WindowVXPrivate (sigc::mem_fun(this, &WindowVXPrivate::prepare)); refreshCursorRectCon(); + updateBaseQuad(); } ~WindowVXPrivate() @@ -311,8 +312,6 @@ struct WindowVXPrivate base.tex = shState->texPool().request(geo.w, geo.h); TEX::bind(base.tex.tex); TEX::setSmooth(true); - - updateBaseQuad(); } void rebuildBaseVert() @@ -470,7 +469,7 @@ struct WindowVXPrivate void updateBaseQuad() { - const FloatRect tex(0, 0, base.tex.width, base.tex.height); + const FloatRect tex(0, 0, geo.w, geo.h); const FloatRect pos(0, (geo.h / 2.0) * (1 - openness.norm), geo.w, geo.h * openness.norm); @@ -833,6 +832,7 @@ void WindowVX::move(int x, int y, int width, int height) p->base.texSizeDirty = true; p->geo = IntRect(x, y, size.x, size.y); + p->updateBaseQuad(); } bool WindowVX::isOpen() const @@ -939,6 +939,7 @@ void WindowVX::setWidth(int value) p->base.texSizeDirty = true; p->clipRectDirty = true; p->ctrlVertDirty = true; + p->updateBaseQuad(); } void WindowVX::setHeight(int value) @@ -952,6 +953,7 @@ void WindowVX::setHeight(int value) p->base.texSizeDirty = true; p->clipRectDirty = true; p->ctrlVertDirty = true; + p->updateBaseQuad(); } void WindowVX::setOX(int value)