fix the toolbox positioning when zoomed out

svn path=/trunk/KDE/kdelibs/; revision=1072152
This commit is contained in:
Marco Martin 2010-01-09 13:41:54 +00:00
parent 8f19e5f9cb
commit d9a0865c3b

View File

@ -597,13 +597,12 @@ void DesktopToolBox::showToolBox()
//could that cast ever fail? //could that cast ever fail?
if (d->containment) { if (d->containment) {
topRight = viewTransform().map(mapFromParent(d->containment->boundingRect().bottomRight())); topRight = d->containment->geometry().bottomRight();
} else { } else {
topRight = boundingRect().topRight(); topRight = boundingRect().topRight();
} }
d->toolBacker->setPos(viewTransform().map(mapFromScene(topRight))-QPoint(d->toolBacker->size().width(), 0));
d->toolBacker->setPos(topRight.x() - d->toolBacker->size().width(), topRight.y());
} else { } else {
//kDebug() << "starting at" << x << startY; //kDebug() << "starting at" << x << startY;
d->toolBacker->setPos(x, y); d->toolBacker->setPos(x, y);