aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-05-20 22:35:29 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-06-28 21:58:29 +0800
commit1a5e54e5ebcadef899159c6145f52ef9934dd473 (patch)
treea9bbf3b4a3873860e44ac22d954f14b75125f505 /core
parente79d177c7150166851e1e8152ecdd1908e1bcacf (diff)
downloadsubsurface-1a5e54e5ebcadef899159c6145f52ef9934dd473.tar.gz
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>
Diffstat (limited to 'core')
-rw-r--r--core/imagedownloader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/imagedownloader.cpp b/core/imagedownloader.cpp
index 2cf5e5d33..18ecd5cd6 100644
--- a/core/imagedownloader.cpp
+++ b/core/imagedownloader.cpp
@@ -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);