diff options
author | Christoph Feck <christoph@maxiom.de> | 2009-05-11 19:58:22 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-28 08:49:25 (GMT) |
commit | cd6fa8abed473936af55055a3ebe209bb7241a85 (patch) | |
tree | d065fb39b116d5ea35259afcc95782d58038fc79 /src/gui/widgets/qabstractscrollarea.cpp | |
parent | f390f9b51cf8686e9ed44f13a33c7349b9e96a09 (diff) | |
download | Qt-cd6fa8abed473936af55055a3ebe209bb7241a85.zip Qt-cd6fa8abed473936af55055a3ebe209bb7241a85.tar.gz Qt-cd6fa8abed473936af55055a3ebe209bb7241a85.tar.bz2 |
Respect PM_ScrollView_ScrollBarSpacing in QAbstractScrollArea::minimumSizeHint()
Reviewed-by: Olivier Goffart
Request-url: http://qt.gitorious.org/qt/qt/merge_requests/382
Diffstat (limited to 'src/gui/widgets/qabstractscrollarea.cpp')
-rw-r--r-- | src/gui/widgets/qabstractscrollarea.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 0d8b4de..5eed745 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -1265,6 +1265,12 @@ QSize QAbstractScrollArea::minimumSizeHint() const int hsbExt = d->hbar->sizeHint().height(); int vsbExt = d->vbar->sizeHint().width(); int extra = 2 * d->frameWidth; + QStyleOption opt; + opt.initFrom(this); + if ((d->frameStyle != QFrame::NoFrame) + && style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, &opt, this)) { + extra += style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &opt, this); + } return QSize(d->scrollBarContainers[Qt::Horizontal]->sizeHint().width() + vsbExt + extra, d->scrollBarContainers[Qt::Vertical]->sizeHint().height() + hsbExt + extra); } |