summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qabstractscrollarea.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2009-05-29 12:41:19 (GMT)
committerDavid Faure <faure@kde.org>2009-05-29 12:41:19 (GMT)
commit5d0870bd71f33c9267572655d0f842c82b017d6a (patch)
treef983ac36c0c46aa226a8b51b4e6db13b4f76ff40 /src/gui/widgets/qabstractscrollarea.cpp
parent1d8a4f55ce40400fcb35a645f2e94837e6ab0a24 (diff)
parent9088aeae9daf02546769377853824397458ba822 (diff)
downloadQt-5d0870bd71f33c9267572655d0f842c82b017d6a.zip
Qt-5d0870bd71f33c9267572655d0f842c82b017d6a.tar.gz
Qt-5d0870bd71f33c9267572655d0f842c82b017d6a.tar.bz2
Merge branch 'master' of git://gitorious.org/qt/qt
Diffstat (limited to 'src/gui/widgets/qabstractscrollarea.cpp')
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp6
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);
}