mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
f82ae2be7f
commit
f7565c4a0f
1 changed files with 1 additions and 0 deletions
|
@ -1739,6 +1739,7 @@ QImage renderSVGIconWidth(const char *id, int size)
|
||||||
QSvgRenderer svg{QString(id)};
|
QSvgRenderer svg{QString(id)};
|
||||||
QSize svgSize = svg.defaultSize();
|
QSize svgSize = svg.defaultSize();
|
||||||
QImage res(size, size * svgSize.height() / svgSize.width(), QImage::Format_ARGB32);
|
QImage res(size, size * svgSize.height() / svgSize.width(), QImage::Format_ARGB32);
|
||||||
|
res.fill(Qt::transparent);
|
||||||
QPainter painter(&res);
|
QPainter painter(&res);
|
||||||
svg.render(&painter);
|
svg.render(&painter);
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue