aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/MimeIconProvider.h
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-02-23 13:08:33 -0500
committerKen Moore <ken@pcbsd.org>2015-02-23 13:08:33 -0500
commitc65a4f358f20f3709d1ebc4e9d2f7931252a50e8 (patch)
tree89e92babda9ce245fe8565029b527105704e41eb /lumina-fm/MimeIconProvider.h
parentUpdate the ROADMAP to 1.0.0-Release (diff)
downloadlumina-c65a4f358f20f3709d1ebc4e9d2f7931252a50e8.tar.gz
lumina-c65a4f358f20f3709d1ebc4e9d2f7931252a50e8.tar.bz2
lumina-c65a4f358f20f3709d1ebc4e9d2f7931252a50e8.zip
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.
Diffstat (limited to 'lumina-fm/MimeIconProvider.h')
-rw-r--r--lumina-fm/MimeIconProvider.h6
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{
bgstack15