From 192052b0b720118796d805d2c607d7d06b60f8fa Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 8 Apr 2010 13:14:55 +0000 Subject: [PATCH] -make sure hints are invalidated when the inner widget resizes -the size hint should take into account the -double- border svn path=/trunk/KDE/kdelibs/; revision=1112548 --- widgets/scrollwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/scrollwidget.cpp b/widgets/scrollwidget.cpp index 5e97f5224..1e28d086c 100644 --- a/widgets/scrollwidget.cpp +++ b/widgets/scrollwidget.cpp @@ -1234,6 +1234,7 @@ bool ScrollWidget::eventFilter(QObject *watched, QEvent *event) if (watched == d->widget.data() && event->type() == QEvent::GraphicsSceneResize) { d->adjustScrollbarsTimer->start(200); + updateGeometry(); } else if (watched == d->widget.data() && event->type() == QEvent::GraphicsSceneMove) { d->horizontalScrollBar->blockSignals(true); d->verticalScrollBar->blockSignals(true); @@ -1255,7 +1256,7 @@ QSizeF ScrollWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) con return QSizeF(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous); } - QSizeF hint = d->widget.data()->effectiveSizeHint(which, constraint)+QSize(d->borderSize, d->borderSize); + QSizeF hint = d->widget.data()->effectiveSizeHint(which, constraint)+QSize(d->borderSize*2, d->borderSize*2); if (d->horizontalScrollBar && d->horizontalScrollBar->isVisible()) { hint += QSize(0, d->horizontalScrollBar->size().height()); }