Use the icon size from KItemListStyleOption for the width and height of the

expansion area instead of KIconLoad::SizeSmall.

BUG: 325543
REVIEW: 113169
FIXED-IN: 4.12
This commit is contained in:
Emmanuel Pescosta 2013-10-09 19:52:53 +02:00
parent b4efdc620e
commit 2114210905

View 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;
}
}