summaryrefslogtreecommitdiffstats
path: root/qt-ui/divepicturewidget.cpp
diff options
context:
space:
mode:
authorGravatar Giuseppe Bilotta <giuseppe.bilotta@gmail.com>2014-10-19 16:15:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-19 07:23:27 -0700
commit60702f104ca5f27c6399db22e4a4bdf2d4b6791f (patch)
treeadb3cabe2ad9c1722496c06b3086a49a839d191e /qt-ui/divepicturewidget.cpp
parent048f18db852c424ff2c5f81a0251074ef3bb4622 (diff)
downloadsubsurface-60702f104ca5f27c6399db22e4a4bdf2d4b6791f.tar.gz
Resolution-indepent dive pictures
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divepicturewidget.cpp')
-rw-r--r--qt-ui/divepicturewidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/divepicturewidget.cpp b/qt-ui/divepicturewidget.cpp
index b44212470..34f69e0ed 100644
--- a/qt-ui/divepicturewidget.cpp
+++ b/qt-ui/divepicturewidget.cpp
@@ -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;
}