fix background center painting; the svg painting is doing something funky still (i'm getting a 1-2px blue border) but the coordinates in paintBackground are all correct at this point (verified with a call to fillRect). but i'm tired and need to go to bed now.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719410
This commit is contained in:
Aaron J. Seigo 2007-10-01 05:50:57 +00:00
parent 3817a54b50
commit 5935c799dc

View File

@ -213,7 +213,7 @@ public:
p.setRenderHint(QPainter::SmoothPixmapTransform); p.setRenderHint(QPainter::SmoothPixmapTransform);
background->paint(&p, QRect(leftOffset, topOffset, leftWidth, topHeight), "topleft"); background->paint(&p, QRect(leftOffset, topOffset, leftWidth, topHeight), "topleft");
background->paint(&p, QRect(rightOffset, topOffset, rightWidth, topHeight), "topright"); background->paint(&p, QRect(rightOffset, topOffset,rightWidth, topHeight), "topright");
background->paint(&p, QRect(leftOffset, bottomOffset, leftWidth, bottomHeight), "bottomleft"); background->paint(&p, QRect(leftOffset, bottomOffset, leftWidth, bottomHeight), "bottomleft");
background->paint(&p, QRect(rightOffset, bottomOffset, rightWidth, bottomHeight), "bottomright"); background->paint(&p, QRect(rightOffset, bottomOffset, rightWidth, bottomHeight), "bottomright");
@ -260,9 +260,11 @@ public:
p.drawTiledPixmap(QRect(contentLeft, bottomOffset, contentWidth, bottomHeight), bottom); p.drawTiledPixmap(QRect(contentLeft, bottomOffset, contentWidth, bottomHeight), bottom);
} }
background->paint(&p, QRect(contentLeft, contentTop, contentWidth + 1, contentHeight + 1), "center"); background->resize(contentWidth, contentHeight);
p.end(); background->paint(&p, QRect(contentLeft, contentTop, contentWidth, contentHeight), "center");
background->resize();
} }
p2->drawPixmap(leftOffset, topOffset, *cachedBackground); p2->drawPixmap(leftOffset, topOffset, *cachedBackground);
} }