this one had me scratching my head for a while: applets that are also containments, but which are not currently being *used* as containments need to have the containment they are in's form factor returned from formFactor, not their own (which probably not set at that point anyways =)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=747861
This commit is contained in:
Aaron J. Seigo 2007-12-13 06:27:23 +00:00
parent 593ae4a10e
commit cdceb6531a

View File

@ -345,7 +345,11 @@ void Containment::setFormFactor(FormFactor formFactor)
FormFactor Containment::formFactor() const
{
return d->formFactor;
if (isContainment()) {
return d->formFactor;
}
return Applet::formFactor();
}
void Containment::setLocation(Location location)
@ -663,6 +667,8 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
//kDebug() << "got hoverenterEvent" << d->immutable << " " << applet->isImmutable();
if (!d->immutable && !applet->isImmutable() && !corona()->isImmutable() && !d->handles.contains(applet)) {
//kDebug() << "generated applet handle";
//TODO: there should be a small delay on showing these. they pop up too quickly/easily
// right now
AppletHandle *handle = new AppletHandle(this, applet);
d->handles[applet] = handle;
connect(handle, SIGNAL(disappearDone(AppletHandle*)),