[PATH] Improve icons layout
David Faure
dfaure at klaralvdalens-datakonsult.se
Tue Jan 20 18:57:40 GMT 2004
On Tuesday 20 January 2004 19:20, Benoit Walter wrote:
> struct KFileIVI::Private
> {
> + KonqIconViewWidget* m_iconView;
> QIconSet icons; // Icon states (cached to prevent re-applying icon effects
> // every time)
> QPixmap thumb; // Raw unprocessed thumbnail
> QString m_animatedIcon; // Name of animation
> bool m_animated; // Animation currently running ?
> + bool m_canPreview; // Can we make a thumbnail preview ?
> + int m_thumbSize; // Size of thumbnail
> KIVDirectoryOverlay* m_directoryOverlay;
> QPixmap m_overlay;
> QString m_overlayName;
> };
I can't really comment on the rest of the patch, but the above seems to eat
quite some memory unnecessarily. This is for each item - and in some directories
there can be many many items, so better not enlarge KFileIVI if not needed.
m_iconView is already stored in QIconViewItem, just cast iconView()
to a KonqIconViewWidget * like we already do in kfileivi.cc
m_canPreview is ok (it fits with the other bool, no size increase)
m_thumbSize can apparently be removed and always recalculated on the fly
as iconview->previewIconSize( size ), unless that's too slow.
Thanks for taking into account the memory consumption issue.
--
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the kfm-devel
mailing list