WindowVX: Fix window resizing from big to small

This commit is contained in:
Jonas Kulla 2014-08-16 19:48:47 +02:00
parent e7882c0d3e
commit 8042289291
1 changed files with 5 additions and 3 deletions

View File

@ -256,6 +256,7 @@ struct WindowVXPrivate
(sigc::mem_fun(this, &WindowVXPrivate::prepare)); (sigc::mem_fun(this, &WindowVXPrivate::prepare));
refreshCursorRectCon(); refreshCursorRectCon();
updateBaseQuad();
} }
~WindowVXPrivate() ~WindowVXPrivate()
@ -311,8 +312,6 @@ struct WindowVXPrivate
base.tex = shState->texPool().request(geo.w, geo.h); base.tex = shState->texPool().request(geo.w, geo.h);
TEX::bind(base.tex.tex); TEX::bind(base.tex.tex);
TEX::setSmooth(true); TEX::setSmooth(true);
updateBaseQuad();
} }
void rebuildBaseVert() void rebuildBaseVert()
@ -470,7 +469,7 @@ struct WindowVXPrivate
void updateBaseQuad() 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), const FloatRect pos(0, (geo.h / 2.0) * (1 - openness.norm),
geo.w, geo.h * 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->base.texSizeDirty = true;
p->geo = IntRect(x, y, size.x, size.y); p->geo = IntRect(x, y, size.x, size.y);
p->updateBaseQuad();
} }
bool WindowVX::isOpen() const bool WindowVX::isOpen() const
@ -939,6 +939,7 @@ void WindowVX::setWidth(int value)
p->base.texSizeDirty = true; p->base.texSizeDirty = true;
p->clipRectDirty = true; p->clipRectDirty = true;
p->ctrlVertDirty = true; p->ctrlVertDirty = true;
p->updateBaseQuad();
} }
void WindowVX::setHeight(int value) void WindowVX::setHeight(int value)
@ -952,6 +953,7 @@ void WindowVX::setHeight(int value)
p->base.texSizeDirty = true; p->base.texSizeDirty = true;
p->clipRectDirty = true; p->clipRectDirty = true;
p->ctrlVertDirty = true; p->ctrlVertDirty = true;
p->updateBaseQuad();
} }
void WindowVX::setOX(int value) void WindowVX::setOX(int value)