}
const QRect rect = m_view->visualRect(index);
-
- // align the toggle on the bottom left of the item
- const int gap = 2;
- const int x = rect.left() + gap;
- const int y = rect.top() + gap;
- m_toggle->move(QPoint(x, y));
+ m_toggle->move(QPoint(rect.left(), rect.top()));
// 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);