From 455d9faf55571c9a2151fb26c58fc66dcb918ffa Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Thu, 27 Sep 2007 22:07:15 +0000 Subject: [PATCH] Tell the layouts who they are doing the layout for. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718010 --- containment.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/containment.cpp b/containment.cpp index cd928a63b..f1cef87b8 100644 --- a/containment.cpp +++ b/containment.cpp @@ -407,13 +407,17 @@ void Containment::setFormFactor(FormFactor formFactor) switch (d->formFactor) { case Planar: - d->layout = new FreeLayout; + d->layout = new FreeLayout(this); break; case Horizontal: - d->layout = new BoxLayout(BoxLayout::LeftToRight); + d->layout = new BoxLayout(BoxLayout::LeftToRight, this); + d->layout->setMargin(0); + d->layout->setSpacing(0); break; case Vertical: - d->layout = new BoxLayout(BoxLayout::TopToBottom); + d->layout = new BoxLayout(BoxLayout::TopToBottom, this); + d->layout->setMargin(0); + d->layout->setSpacing(0); break; case MediaCenter: //FIXME: need a layout type here!