move applet->setDrawStandardBackground(false) to within Containment::addApplet()

this appears to fix all the bugs with applets not showing up on the panel :)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=724060
This commit is contained in:
Chani Armitage 2007-10-11 08:41:10 +00:00
parent 5e275a216c
commit 7d2771e8f3
2 changed files with 4 additions and 5 deletions

View File

@ -366,6 +366,10 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
}
applet->setParentItem(this);
//panels don't want backgrounds, which is important when setting geometry
if (type() == PanelContainment) {
applet->setDrawStandardBackground(false);
}
//the applet needs to be given constraints before it can set its geometry
applet->updateConstraints(Plasma::AllConstraints);

View File

@ -231,11 +231,6 @@ void Corona::loadDefaultSetup()
applets << tasksApplet << systemTrayApplet << clockApplet;
foreach (Plasma::Applet* applet , applets) {
// If we have a Panel class (is a Container), this should move there
applet->init();
applet->setDrawStandardBackground(false);
}
}
Containment* Corona::containmentForScreen(int screen) const