From: Peter Penz Date: Thu, 7 May 2009 17:30:25 +0000 (+0000) Subject: * Use the height of the icon as factor for the toggle size. This prevents that the... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/6a0a4708c242642ef4e6b9d831792d336b9545a9?ds=sidebyside * Use the height of the icon as factor for the toggle size. This prevents that the size of the toggle changes within one view because of items having one or two text lines. * Use a larger toggle size starting with 48x48-sized icons. svn path=/trunk/KDE/kdebase/apps/; revision=964943 --- diff --git a/src/selectionmanager.cpp b/src/selectionmanager.cpp index 129e7e2ca..7dd07e63e 100644 --- a/src/selectionmanager.cpp +++ b/src/selectionmanager.cpp @@ -88,9 +88,10 @@ void SelectionManager::slotEntered(const QModelIndex& index) m_toggle->move(QPoint(x, y)); // increase the size of the toggle for large items - if (rect.height() >= KIconLoader::SizeEnormous) { + const int height = m_view->iconSize().height(); + if (height >= KIconLoader::SizeEnormous) { m_toggle->resize(KIconLoader::SizeMedium, KIconLoader::SizeMedium); - } else if (rect.height() >= KIconLoader::SizeHuge) { + } else if (height >= KIconLoader::SizeLarge) { m_toggle->resize(KIconLoader::SizeSmallMedium, KIconLoader::SizeSmallMedium); } else { m_toggle->resize(KIconLoader::SizeSmall, KIconLoader::SizeSmall);