From 4bff9b691232a207c333a3d453a79f79337172cf Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sat, 10 Nov 2007 23:13:42 +0000 Subject: [PATCH] KRUSH: free layout needs a proper sizeHint svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=735119 --- widgets/freelayout.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/widgets/freelayout.cpp b/widgets/freelayout.cpp index 91d8ca027..0f4757dd5 100644 --- a/widgets/freelayout.cpp +++ b/widgets/freelayout.cpp @@ -18,11 +18,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include - #include "freelayout.h" +#include + +#include + namespace Plasma { @@ -97,6 +98,10 @@ QRectF FreeLayout::geometry() const QSizeF FreeLayout::sizeHint() const { + if (parent()) { + return parent()->geometry().size(); + } + return maximumSize(); }