Tell the layouts who they are doing the layout for.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718010
This commit is contained in:
Alex Merry 2007-09-27 22:07:15 +00:00
parent c982fdde3b
commit 455d9faf55

View File

@ -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!