propery geometries

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741913
This commit is contained in:
Aaron J. Seigo 2007-11-26 18:23:51 +00:00
parent 05ae38296c
commit 852d3253cc

View File

@ -45,8 +45,9 @@ public:
format.setAlphaBufferSize(8);
//dummy size construction
pbuf = new QGLPixelBuffer(300, 300, format, dummy);
if (pbuf->isValid())
if (pbuf->isValid()) {
pbuf->makeCurrent();
}
}
void updateGlSize(const QSize &size)
{
@ -179,7 +180,7 @@ void GLApplet::paintInterface(QPainter *painter,
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
QMatrix m = painter->worldMatrix();
QRect deviceRect = m.mapRect(boundingRect()).toRect();
QRect deviceRect = m.mapRect(QRect(QPoint(23, 25), contentSize().toSize()));
d->updateGlSize(deviceRect.size());
// redirect this widget's painting into the pbuffer