From c65a4f358f20f3709d1ebc4e9d2f7931252a50e8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 23 Feb 2015 13:08:33 -0500 Subject: Add an option in lumina-fm to enable/disable loading file thumbnails. NOTE: This option does not retroactively remove thumbnails that have already been loaded - it only prevents loading thumbnails in new directories. --- lumina-fm/MimeIconProvider.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lumina-fm/MimeIconProvider.h') diff --git a/lumina-fm/MimeIconProvider.h b/lumina-fm/MimeIconProvider.h index 044ff7eb..344d6801 100644 --- a/lumina-fm/MimeIconProvider.h +++ b/lumina-fm/MimeIconProvider.h @@ -19,15 +19,19 @@ class MimeIconProvider : public QFileIconProvider{ public: + bool showthumbnails; MimeIconProvider() : QFileIconProvider(){ + showthumbnails = false; } ~MimeIconProvider(){} + + QIcon icon(const QFileInfo &info) const{ if(info.isDir()){ return LXDG::findIcon("folder",""); }else if(info.isFile()){ - if(info.suffix().toLower()=="png" || info.suffix().toLower()=="jpg"){ + if(showthumbnails && (info.suffix().toLower()=="png" || info.suffix().toLower()=="jpg") ){ //make sure to only load small versions of the files into memory: could have hundreds of them... return QIcon( QPixmap(info.absoluteFilePath()).scaledToHeight(64) ); }else{ -- cgit