should be correctly positioned in case of top panels

svn path=/trunk/KDE/kdelibs/; revision=979968
This commit is contained in:
Marco Martin 2009-06-10 20:25:15 +00:00
parent 1e4a7ee457
commit 41deec416d

View File

@ -496,7 +496,7 @@ void ToolBox::reposition()
if (!d->containment->view() || !d->containment->view()->transform().isScaling()) {
if (QApplication::layoutDirection() == Qt::RightToLeft) {
if (avail.top() > screenGeom.top()) {
setPos(avail.topLeft() - QPoint(0, boundingRect().height()));
setPos(avail.topLeft() - QPoint(0, avail.top()));
setCorner(ToolBox::Left);
} else if (avail.left() > screenGeom.left()) {
setPos(avail.topLeft() - QPoint(boundingRect().width(), 0));
@ -507,7 +507,7 @@ void ToolBox::reposition()
}
} else {
if (avail.top() > screenGeom.top()) {
setPos(avail.topRight() - QPoint(0, boundingRect().height()));
setPos(avail.topRight() - QPoint(boundingRect().width(), -avail.top()));
setCorner(ToolBox::Right);
} else if (avail.right() < screenGeom.right()) {
setPos(avail.topRight() - QPoint(boundingRect().width(), 0));