From 704d0904e5e18eaab8a502a03faaed83da9558e1 Mon Sep 17 00:00:00 2001 From: Rob Scheepmaker Date: Sun, 3 Aug 2008 12:27:19 +0000 Subject: [PATCH] Respect the sizepolicy set on the widget wrapped in this extenderitem. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841512 --- extenderitem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extenderitem.cpp b/extenderitem.cpp index 65117fcc0..e98814cfa 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -503,6 +503,7 @@ void ExtenderItem::setCollapsed(bool collapsed) setMinimumSize(QSizeF(0, d->dragHandleRect().height())); //FIXME: wasn't there some sort of QWIDGETMAXSIZE thingy? setMaximumSize(QSizeF(1000, d->dragHandleRect().height())); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); updateGeometry(); return; } @@ -516,6 +517,7 @@ void ExtenderItem::setCollapsed(bool collapsed) setPreferredSize(QSizeF(d->widget->preferredWidth(), d->dragHandleRect().height())); setMinimumSize(QSizeF(d->widget->minimumWidth(), d->dragHandleRect().height())); setMaximumSize(QSizeF(d->widget->maximumWidth(), d->dragHandleRect().height())); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); //FIXME: why don't tooltips work? //d->collapseIcon->setToolTip(i18n("Expand this widget")); } else { @@ -525,6 +527,8 @@ void ExtenderItem::setCollapsed(bool collapsed) d->widget->minimumHeight() + d->dragHandleRect().height())); setMaximumSize( QSizeF(d->widget->maximumWidth(), d->widget->maximumHeight() + d->dragHandleRect().height())); + + setSizePolicy(d->widget->sizePolicy()); //d->collapseIcon->setToolTip(i18n("Collapse this widget")); }