Resolution-indepent dive pictures

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Giuseppe Bilotta 2014-10-19 16:15:19 +02:00 committed by Dirk Hohndel
parent 048f18db85
commit 60702f104c

View file

@ -1,4 +1,6 @@
#include "divepicturewidget.h"
#include "metrics.h"
#include <dive.h>
#include <divelist.h>
#include <QtConcurrentMap>
@ -26,7 +28,8 @@ SPixmap scaleImages(const QString &s)
if (cache.contains(s)) {
ret.second = cache.value(s);
} else {
QImage p = QImage(s).scaled(128, 128, Qt::KeepAspectRatio);
int dim = defaultIconMetrics().sz_pic;
QImage p = QImage(s).scaled(dim, dim, Qt::KeepAspectRatio);
cache.insert(s, p);
ret.second = p;
}