From 2297cbee2ecc9e882d02125e4f38f3b557c83443 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Tue, 5 Oct 2010 17:56:07 +0000 Subject: [PATCH] Prevent that icons overlap in Details View when zooming. The problem was that a maximum size was assigned to KFileItemDelegate for displaying items without considering that icon zooming may change the item height. CCBUG: 234600 svn path=/trunk/KDE/kdebase/apps/; revision=1182797 --- src/views/dolphindetailsview.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/views/dolphindetailsview.cpp b/src/views/dolphindetailsview.cpp index d14186383..04ce06f6d 100644 --- a/src/views/dolphindetailsview.cpp +++ b/src/views/dolphindetailsview.cpp @@ -1070,7 +1070,19 @@ void DolphinDetailsView::updateDecorationSize(bool showPreview) setIconSize(QSize(iconSize, iconSize)); m_decorationSize = QSize(iconSize, iconSize); + if (m_extensionsFactory) { + // The old maximumSize used by KFileItemDelegate is not valid any more after the icon size change. + // It must be discarded before doItemsLayout() is called (see bug 234600). + m_extensionsFactory->fileItemDelegate()->setMaximumSize(QSize()); + } + doItemsLayout(); + + // Calculate the new maximumSize for KFileItemDelegate after the icon size change. + QModelIndex current = currentIndex(); + if (current.isValid()) { + adjustMaximumSizeForEditing(current); + } } KFileItemDelegate::Information DolphinDetailsView::infoForColumn(int columnIndex) const -- 2.47.3