From 1a5e54e5ebcadef899159c6145f52ef9934dd473 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 20 May 2018 22:35:29 +0200 Subject: 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 --- core/imagedownloader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/imagedownloader.cpp') 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 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); -- cgit v1.2.3-70-g09d2