aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2014-10-02 22:51:31 -0400
committerKen Moore <moorekou@gmail.com>2014-10-02 22:51:31 -0400
commitdd2ad00aee2a097915332061acc358d4c31d7d8d (patch)
treeecd877e2945b457b109afed33b3dcf04a19ed814 /lumina-fm
parentAdd a new dialog to lumina-config for selecting applications: (diff)
downloadlumina-dd2ad00aee2a097915332061acc358d4c31d7d8d.tar.gz
lumina-dd2ad00aee2a097915332061acc358d4c31d7d8d.tar.bz2
lumina-dd2ad00aee2a097915332061acc358d4c31d7d8d.zip
Update MimeIconProvider.h
Make sure that thumbnails only store a tiny version of the image: could have hundreds of these in a directory and we don't want to overload the system memory.
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/MimeIconProvider.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lumina-fm/MimeIconProvider.h b/lumina-fm/MimeIconProvider.h
index 6bb3dacf..044ff7eb 100644
--- a/lumina-fm/MimeIconProvider.h
+++ b/lumina-fm/MimeIconProvider.h
@@ -28,7 +28,8 @@ public:
return LXDG::findIcon("folder","");
}else if(info.isFile()){
if(info.suffix().toLower()=="png" || info.suffix().toLower()=="jpg"){
- return QIcon(info.absoluteFilePath());
+ //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{
return LXDG::findMimeIcon(info.suffix());
}
@@ -51,4 +52,4 @@ public:
};
-#endif \ No newline at end of file
+#endif
bgstack15