mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
048f18db85
commit
60702f104c
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue