]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use the icon size from KItemListStyleOption for the width and height of the
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Wed, 9 Oct 2013 17:52:53 +0000 (19:52 +0200)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Wed, 9 Oct 2013 17:52:53 +0000 (19:52 +0200)
expansion area instead of KIconLoad::SizeSmall.

BUG: 325543
REVIEW: 113169
FIXED-IN: 4.12

src/kitemviews/kstandarditemlistwidget.cpp

index 4b9f33b6f07161f84d811040626f08ff8be935f4..302150fec1267d93a094a3c5d2b0e3400acc41ca 100644 (file)
@@ -802,11 +802,12 @@ void KStandardItemListWidget::updateExpansionArea()
         const QHash<QByteArray, QVariant> values = data();
         const int expandedParentsCount = values.value("expandedParentsCount", 0).toInt();
         if (expandedParentsCount >= 0) {
+            const KItemListStyleOption& option = styleOption();
             const qreal widgetHeight = size().height();
-            const qreal inc = (widgetHeight - KIconLoader::SizeSmall) / 2;
+            const qreal inc = (widgetHeight - option.iconSize) / 2;
             const qreal x = expandedParentsCount * widgetHeight + inc;
             const qreal y = inc;
-            m_expansionArea = QRectF(x, y, KIconLoader::SizeSmall, KIconLoader::SizeSmall);
+            m_expansionArea = QRectF(x, y, option.iconSize, option.iconSize);
             return;
         }
     }