summaryrefslogtreecommitdiff
path: root/src/gui/widgets/qabstractscrollarea.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-05-29 12:37:04 +0200
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-05-29 12:37:04 +0200
commiteaf85eb428bc1336c16187b5e4df61f63a19068c (patch)
treeea017ac92bea46c6ec10f75775c4a2d18330cf23 /src/gui/widgets/qabstractscrollarea.cpp
parent429cd0ee393ad2eef9cea253f7e4dc8940e0cad7 (diff)
parent766cf07cbe7ebfda01dad163bb070fff7e3077d5 (diff)
downloadqt4-tools-eaf85eb428bc1336c16187b5e4df61f63a19068c.tar.gz
Merge branch 'master' of git@scm.dev.nokia.troll.no: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 b91e3dd8f9..79ca11dc42 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -1266,6 +1266,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);
}