Review Request: Enlarge image in folder preview when there's only one image

Martin Engelmann murphi.oss at
Sat Jan 15 09:37:59 GMT 2011

This is an automatically generated e-mail. To reply, visit:

Review request for kdelibs.


As stated in the bug report, the image on the folder preview should be enlarged if there is only one image.

To achieve this there are two images created for the folder: "img" as before and "oneTileImg". "oneTileImg" starts with the same image as "img", but after the first thumbnail is generated "oneTileImg" won't be touched. The number of successfully created thumbnails is counted in "validThumbnails". If only one thumbnail could be generated, "oneTileImg" is returned.

The code between lines 566 and 589 in the original thumbnail.cpp was partly extracted into a new function called "drawSubThumbnail". This is done to simplify the creation of the second preview.

The extra effort to create the "oneTileImg" comparable to creating a fifth preview image for the folder.

This addresses bug 240861.


  /trunk/KDE/kdebase/runtime/kioslave/thumbnail/thumbnail.h 1214477 
  /trunk/KDE/kdebase/runtime/kioslave/thumbnail/thumbnail.cpp 1214477 



Tested using both Dolphin and Konqueror from trunk.

The thumbnail generation was tested by moving images and files without thumbnail plug-in to a new folder. Then one file after another was deleted until only files without thumbnail plug-in were present.

Also I opened randomly some folders with sub-folders containing large amounts of images (e.g. oxygen icon set with > 550 action icons) to the performance.


Folder thumbnails for oxygen icon set in Konqueror



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list