diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-26 09:47:38 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-26 09:47:38 -0400 |
commit | 946cb4e3e3695fc37dc2ec8cab21f60874c048cb (patch) | |
tree | b59bed33101b493dbabb70bbb4b7edd79794c153 /src-qt5/desktop-utils/lumina-fm/Browser.cpp | |
parent | Large amount of whitespace cleanup, and almost get the LuminaRandR class fini... (diff) | |
download | lumina-946cb4e3e3695fc37dc2ec8cab21f60874c048cb.tar.gz lumina-946cb4e3e3695fc37dc2ec8cab21f60874c048cb.tar.bz2 lumina-946cb4e3e3695fc37dc2ec8cab21f60874c048cb.zip |
Finish up all the new TreeWidget stuff from JT:
1. Save/load the size of the tree widget between sessions (sync size across all tabs as well).
2. Sync the tree widget with the browser with regards to whether hidden files should be shown or not.
3. Tie the tree widget "dir model" to the line edit so we get auto-completions again.
4. Make sure the tree widget shows the "normalized" directory path (does not show ZFS snapshot dirs and such).
5. Clean up a lot of debugging messages and comment out unused variable declarations.
6. Change the Browser thumbnail loading/scaling routine to always run based on image resolution rather than file size.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/Browser.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/Browser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp index 1d57dd8c..adfe6162 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp +++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp @@ -59,7 +59,7 @@ void Browser::loadItem(QString info, Browser *obj){ QByteArray bytes = file.readAll(); file.close(); pix.loadFromData(bytes); - if(bytes.size() > (512*1024) ){ //more than 512 KB + if(pix.width() > 256 || pix.height() > 256 ){ pix = pix.scaled(256,256, Qt::KeepAspectRatio, Qt::SmoothTransformation); } } @@ -117,7 +117,7 @@ void Browser::futureFinished(QString name, QImage icon){ void Browser::loadDirectory(QString dir){ if(dir.isEmpty()){ dir = currentDir; } //reload current directory if(dir.isEmpty()){ return; } //nothing to do - nothing previously loaded - qDebug() << "Load Directory" << dir; + //qDebug() << "Load Directory" << dir; if(currentDir != dir){ //let the main widget know to clear all current items (completely different dir) oldFiles.clear(); emit clearItems(); |