Merge remote-tracking branch 'origin/KDE/4.12'

This commit is contained in:
Frank Reininghaus 2013-11-18 23:48:14 +01:00
commit d673c412b4

View file

@ -338,16 +338,17 @@ void KItemListContainer::updateGeometries()
int extra = frameWidth() * 2;
QStyleOption option;
option.initFrom(this);
int scrollbarSpacing = 0;
if (style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, &option, this)) {
extra += style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &option, this);
scrollbarSpacing = style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &option, this);
}
const int widthDec = verticalScrollBar()->isVisible()
? extra + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this)
? extra + scrollbarSpacing + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this)
: extra;
const int heightDec = horizontalScrollBar()->isVisible()
? extra + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this)
? extra + scrollbarSpacing + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this)
: extra;
rect.adjust(0, 0, -widthDec, -heightDec);