diff --git a/app/advancedconfigpage.ui b/app/advancedconfigpage.ui --- a/app/advancedconfigpage.ui +++ b/app/advancedconfigpage.ui @@ -26,7 +26,7 @@ - Delete thumbnail cache folder on exit + Low resource usage mode @@ -48,7 +48,7 @@ - Enable this option if you do not have a lot of disk space.<br/><br/><em>Be careful:</em> this will delete the folder named <filename>.thumbnails</filename> in your home folder, deleting all thumbnails previously generated by Gwenview and other applications. + Enable this option if you do not have a lot of disk space. This will avoid storing thumbnails on disk and will prefer embedded thumbnails of lower quality that are faster to load, if available.<br/><br/><em>Be careful:</em> this will delete the folder named <filename>.thumbnails</filename> in your home folder, deleting all thumbnails previously generated by Gwenview and other applications. true diff --git a/doc/index.docbook b/doc/index.docbook --- a/doc/index.docbook +++ b/doc/index.docbook @@ -846,7 +846,7 @@ Cache - Enable the Delete thumbnail cache folder on exit option if you do not have a lot of disk space. + Enable the Low resource usage mode option if you do not have a lot of disk space. This will avoid storing thumbnails on disk and will prefer embedded thumbnails of lower quality that are faster to load, if available. Be careful: This will delete the folder named .thumbnails in your home folder, deleting all thumbnails previously generated by &gwenview; and other applications. diff --git a/lib/thumbnailprovider/thumbnailgenerator.cpp b/lib/thumbnailprovider/thumbnailgenerator.cpp --- a/lib/thumbnailprovider/thumbnailgenerator.cpp +++ b/lib/thumbnailprovider/thumbnailgenerator.cpp @@ -119,7 +119,11 @@ if (!content.rawData().isEmpty()) { QImage thumbnail = content.thumbnail(); - if (qMax(thumbnail.width(), thumbnail.height()) >= pixelSize) { + // If the user does not care about the generated thumbnails (by deleting them on exit), use ANY + // embedded thumnail, even if it's too small. + if (!thumbnail.isNull() && + (GwenviewConfig::deleteThumbnailCacheOnExit() || qMax(thumbnail.width(), thumbnail.height()) >= pixelSize) + ) { mImage = std::move(thumbnail); mOriginalWidth = content.size().width(); mOriginalHeight = content.size().height();