[Digikam-devel] Re: extragear/graphics/digikam/libs/models

Marcel Wiesweg marcel.wiesweg at gmx.de
Wed Nov 17 19:28:24 GMT 2010


> Something is wrong here, this fix isn't a good solution.
> When I switch into PreviewMode, the size of the thumbnail is set to the
> zoomLevel of the preview image.
> I guess the fix must be a little bit more complex, any idea what's wrong
> exactly?

lastGlobalThumbnailSize is set when you call setThumbnailSize() on the model, 
and it should only be set there.
In fact, it is never used: Because all views are driven by the same model, we 
cannot set a common thumbnail size. Instead, each ItemViewImageDelegate has 
its own thumbnail size which it sets with setData, requests the thumbnail, 
then resets again.
To find out the thumbnail size of the view, call 
ImageCategorizedView::thumbnailSize() which calls the delegate's 
thumbnailSize().

Where is the model's global thumbnail size used? It is probably invalid.

Note that there is a border of 1px width around each thumbnail, so 
ThumbnailLoadThread::maximumThumbnailSize() is 256 but 
maximumThumbnailPixmapSize(true) is 258.

Marcel



More information about the Digikam-devel mailing list