simplify a bit, now Svg can return directly a pixmap
svn path=/trunk/KDE/kdelibs/; revision=1091013
This commit is contained in:
parent
74ab090b72
commit
bd87a3f3b7
@ -725,14 +725,8 @@ QPixmap IconWidgetPrivate::decoration(const QStyleOptionGraphicsItem *option, bo
|
||||
|
||||
if (iconSvg) {
|
||||
if (iconSvgElementChanged || iconSvgPixmap.size() != iconSize.toSize()) {
|
||||
QImage img(iconSize.toSize(), QImage::Format_ARGB32_Premultiplied);
|
||||
{
|
||||
img.fill(0);
|
||||
QPainter p(&img);
|
||||
iconSvg->resize(iconSize);
|
||||
iconSvg->paint(&p, img.rect(), iconSvgElement);
|
||||
}
|
||||
iconSvgPixmap = QPixmap::fromImage(img);
|
||||
iconSvg->resize(iconSize);
|
||||
iconSvgPixmap = iconSvg->pixmap(iconSvgElement);
|
||||
iconSvgElementChanged = false;
|
||||
}
|
||||
result = iconSvgPixmap;
|
||||
|
Loading…
Reference in New Issue
Block a user