From 26d4a28aad3f172493e30080f2e499a0b1a7f7d3 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Thu, 13 Sep 2007 14:59:29 +0000 Subject: [PATCH] Use FreeLayout as the Corona's layout in the Planar form factor (vs. BoxLayout in the Horizontal or Vertical form factors) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=712086 --- corona.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/corona.cpp b/corona.cpp index 61c327c05..b0d68c0c3 100644 --- a/corona.cpp +++ b/corona.cpp @@ -37,6 +37,7 @@ #include "dataengine.h" #include "karambamanager.h" #include "phase.h" +#include "widgets/freelayout.h" #include "widgets/boxlayout.h" #include "widgets/icon.h" @@ -52,7 +53,7 @@ public: : immutable(false), formFactor(Planar), location(Floating), - layout(0), + layout(new FreeLayout), mimetype("text/x-plasmoidservicename") { } @@ -133,6 +134,7 @@ void Corona::setFormFactor(FormFactor formFactor) switch (d->formFactor) { case Planar: + d->layout = new FreeLayout; break; case Horizontal: d->layout = new BoxLayout(BoxLayout::LeftToRight); @@ -248,6 +250,8 @@ Applet* Corona::addApplet(const QString& name, const QVariantList& args, uint id } #endif + if ( d->layout ) + d->layout->addItem(applet); addItem(applet); applet->updateConstraints();