now the panel toolbox looks way better (still only in horizontal panels

btw)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=797291
This commit is contained in:
Marco Martin 2008-04-15 10:44:24 +00:00
parent 5dec314c85
commit 01c5a6620c

View File

@ -247,12 +247,11 @@ void Containment::containmentConstraintsUpdated(Plasma::Constraints constraints)
} }
} }
if (constraints & Plasma::ScreenConstraint && d->toolbox) { if ((constraints & Plasma::SizeConstraint || constraints & Plasma::ScreenConstraint) && d->toolbox) {
if (d->type == PanelContainment) { if (d->type == PanelContainment) {
//FIXME: geometry() always returns a 0x0 size in the panels d->toolbox->setPos(geometry().right(), geometry().height()/2 - d->toolbox->boundingRect().height()/2);
d->toolbox->setPos(geometry().width() - d->toolbox->boundingRect().width(), geometry().height()/2 - d->toolbox->size());
} else { } else {
d->toolbox->setPos(geometry().width() - d->toolbox->boundingRect().width(), 0); d->toolbox->setPos(geometry().right() - qAbs(d->toolbox->boundingRect().width()), 0);
} }
d->toolbox->enableTool("addwidgets", !isImmutable()); d->toolbox->enableTool("addwidgets", !isImmutable());
} }