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
This commit is contained in:
parent
e5db207cfd
commit
26d4a28aad
@ -37,6 +37,7 @@
|
|||||||
#include "dataengine.h"
|
#include "dataengine.h"
|
||||||
#include "karambamanager.h"
|
#include "karambamanager.h"
|
||||||
#include "phase.h"
|
#include "phase.h"
|
||||||
|
#include "widgets/freelayout.h"
|
||||||
#include "widgets/boxlayout.h"
|
#include "widgets/boxlayout.h"
|
||||||
#include "widgets/icon.h"
|
#include "widgets/icon.h"
|
||||||
|
|
||||||
@ -52,7 +53,7 @@ public:
|
|||||||
: immutable(false),
|
: immutable(false),
|
||||||
formFactor(Planar),
|
formFactor(Planar),
|
||||||
location(Floating),
|
location(Floating),
|
||||||
layout(0),
|
layout(new FreeLayout),
|
||||||
mimetype("text/x-plasmoidservicename")
|
mimetype("text/x-plasmoidservicename")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -133,6 +134,7 @@ void Corona::setFormFactor(FormFactor formFactor)
|
|||||||
|
|
||||||
switch (d->formFactor) {
|
switch (d->formFactor) {
|
||||||
case Planar:
|
case Planar:
|
||||||
|
d->layout = new FreeLayout;
|
||||||
break;
|
break;
|
||||||
case Horizontal:
|
case Horizontal:
|
||||||
d->layout = new BoxLayout(BoxLayout::LeftToRight);
|
d->layout = new BoxLayout(BoxLayout::LeftToRight);
|
||||||
@ -248,6 +250,8 @@ Applet* Corona::addApplet(const QString& name, const QVariantList& args, uint id
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if ( d->layout )
|
||||||
|
d->layout->addItem(applet);
|
||||||
addItem(applet);
|
addItem(applet);
|
||||||
applet->updateConstraints();
|
applet->updateConstraints();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user