mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:03:23 +00:00
Dive pictures: render icons with white instead of transparent background
The SVG icons for failed / still-loading pictures were rendered with an alpha channel. This lead to strange behavior when hovering over the icon in the profile plot: When hitting a "hole" the icon would be minimized again. Therefore, render the SVGs onto a white background. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e79d177c71
commit
1a5e54e5eb
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ static std::pair<QImage, bool> getHashedImage(const QString &filename, bool tryD
|
|||
|
||||
static QImage renderIcon(const char *id, int size)
|
||||
{
|
||||
QImage res(size, size, QImage::Format_ARGB32);
|
||||
QImage res(size, size, QImage::Format_RGB32);
|
||||
res.fill(Qt::white);
|
||||
QSvgRenderer svg{QString(id)};
|
||||
QPainter painter(&res);
|
||||
svg.render(&painter);
|
||||
|
|
Loading…
Add table
Reference in a new issue