core: clear image before rendering SVGs

In renderSVGIconWidth() the image was not cleared, leading
to garbage backgrounds. This should have affected the video
icons. Apparently, nobody is using them..?

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-08-30 21:36:21 +02:00 committed by Dirk Hohndel
parent f82ae2be7f
commit f7565c4a0f

View file

@ -1739,6 +1739,7 @@ QImage renderSVGIconWidth(const char *id, int size)
QSvgRenderer svg{QString(id)};
QSize svgSize = svg.defaultSize();
QImage res(size, size * svgSize.height() / svgSize.width(), QImage::Format_ARGB32);
res.fill(Qt::transparent);
QPainter painter(&res);
svg.render(&painter);
return res;