From 05a1626c7e14978c55a9670f35ff72e2a3388096 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 17 Dec 2017 16:17:38 +0100 Subject: Implement different zoom levels for dive photos tab This implements different zoom levels for the dive photos tab as suggested by Stefan Fuchs in #898. The zoom level can be changed using a slider or CTRL+mousewheel. Zoom levels range from a third of the standard thumbnail size to thrice the standard thumbnail size. Thumbnails are cached in maximum resolution and scaled down on the fly. Because the profile widget took its pictures from the photo list model, an extra picture copy with a fixed size had to be introduced. The UI is still a bit crude. Reported-by: Stefan Fuchs Signed-off-by: Berthold Stoeger --- profile-widget/profilewidget2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'profile-widget') diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index b7b6057fe..55eb40000 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -2007,7 +2007,7 @@ void ProfileWidget2::plotPictures() if (!offsetSeconds) continue; DivePictureItem *item = new DivePictureItem(); - item->setPixmap(m->index(i, 0).data(Qt::DecorationRole).value()); + item->setPixmap(m->index(i, 0).data(Qt::UserRole).value()); item->setFileUrl(m->index(i, 1).data().toString()); // let's put the picture at the correct time, but at a fixed "depth" on the profile // not sure this is ideal, but it seems to look right. -- cgit v1.2.3-70-g09d2