diff options
| author | Peter Penz <[email protected]> | 2008-08-05 20:15:51 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-08-05 20:15:51 +0000 |
| commit | 7308c7d03e182795d6b64d85a3f0725d8af32436 (patch) | |
| tree | 4d7414dccbfbf6d28864ee2bb3615b3a27a59b26 /src/iconmanager.cpp | |
| parent | 208549cefcd47b4454b8e38b2c5cb12b82189b7b (diff) | |
First step of refactoring to improve the zooming capabilities of views:
* Let classes that use DolphinView know about the currently used zoom level.
* Provide more zoom levels for all views (the settings dialogs have not been adjusted yet).
* Fixed issue that when using the wheel that the enabled state of the zoom actions has not been updated.
svn path=/trunk/KDE/kdebase/apps/; revision=842715
Diffstat (limited to 'src/iconmanager.cpp')
| -rw-r--r-- | src/iconmanager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp index 11a3e2864..56c2b627c 100644 --- a/src/iconmanager.cpp +++ b/src/iconmanager.cpp @@ -506,7 +506,14 @@ void IconManager::startPreviewJob(const KFileItemList& items) m_hasCutSelection = KonqMimeData::decodeIsCutSelection(mimeData); const QSize size = m_view->iconSize(); - KIO::PreviewJob* job = KIO::filePreview(items, 128, 128); + + // PreviewJob internally caches items always with the size of + // 128 x 128 pixels or 256 x 256 pixels. A downscaling is done + // by PreviewJob if a smaller size is requested. As the IconManager must + // do a downscaling anyhow because of the frame, only the provided + // cache sizes are requested. + const int cacheSize = (size.width() > 128) || (size.height() > 128) ? 256 : 128; + KIO::PreviewJob* job = KIO::filePreview(items, cacheSize, cacheSize); connect(job, SIGNAL(gotPreview(const KFileItem&, const QPixmap&)), this, SLOT(addToPreviewQueue(const KFileItem&, const QPixmap&))); connect(job, SIGNAL(finished(KJob*)), |
