aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/desktop-plugins
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-28 09:56:15 -0400
committerKen Moore <ken@pcbsd.org>2015-05-28 09:56:15 -0400
commitd0fb463abb9e79606c9eb75b3a94331127cd5060 (patch)
tree2ffe3c0cb2e6dee36e56fef82bf49eb5e17d5b47 /lumina-desktop/desktop-plugins
parentFix up the display of directories in the user button plugin. (diff)
downloadlumina-d0fb463abb9e79606c9eb75b3a94331127cd5060.tar.gz
lumina-d0fb463abb9e79606c9eb75b3a94331127cd5060.tar.bz2
lumina-d0fb463abb9e79606c9eb75b3a94331127cd5060.zip
Add a new LUtils::imageExtensions() function, and setup the lumina-desktop plugins to all use that for checking whether a thumbnail can be shown. Also add thumbnail support into the user button for favorite files.
Diffstat (limited to 'lumina-desktop/desktop-plugins')
-rw-r--r--lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp6
-rw-r--r--lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
index e86f2853..467b802b 100644
--- a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
@@ -132,10 +132,10 @@ void DesktopViewPlugin::decreaseIconSize(){
void DesktopViewPlugin::updateContents(){
list->clear();
- if(imgExtensions.isEmpty()){
+ /*if(imgExtensions.isEmpty()){
QList<QByteArray> fmt = QImageReader::supportedImageFormats();
for(int i=0; i<fmt.length(); i++){ imgExtensions << QString::fromLocal8Bit(fmt[i]); }
- }
+ }*/
int icosize = settings->value("IconSize",64).toInt();
QSize gridSZ = QSize(icosize+8,icosize+4+(2*this->fontMetrics().height()) );
//qDebug() << "Icon Size:" << icosize <<"Grid Size:" << gridSZ.width() << gridSZ.height();
@@ -166,7 +166,7 @@ void DesktopViewPlugin::updateContents(){
it->setIcon( LXDG::findMimeIcon(files[i].fileName()) );
txt = files[i].fileName();
}
- }else if(imgExtensions.contains(files[i].suffix().toLower()) ){
+ }else if(LUtils::imageExtensions().contains(files[i].suffix().toLower()) ){
it->setIcon( QIcon( QPixmap(files[i].absoluteFilePath()).scaled(icosize,icosize,Qt::IgnoreAspectRatio, Qt::SmoothTransformation) ) );
txt = files[i].fileName();
}else{
diff --git a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.h b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.h
index 90bc20eb..d8f217f0 100644
--- a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.h
+++ b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.h
@@ -27,7 +27,7 @@ private:
QListWidget *list;
QFileSystemWatcher *watcher;
QMenu *menu;
- QStringList imgExtensions;
+ //QStringList imgExtensions;
private slots:
void runItems();
bgstack15