diff options
Diffstat (limited to 'lumina-fm/MimeIconProvider.h')
-rw-r--r-- | lumina-fm/MimeIconProvider.h | 6 |
1 files changed, 5 insertions, 1 deletions
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{ |