aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divepicturewidget.cpp
diff options
context:
space:
mode:
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;
}