popups aligned with the exact pixel of the panel

svn path=/trunk/KDE/kdelibs/; revision=941938
This commit is contained in:
Marco Martin 2009-03-20 18:45:21 +00:00
parent 09124a85aa
commit 47a6a491d7

View File

@ -494,16 +494,16 @@ QPoint Corona::popupPosition(const QGraphicsItem *item, const QSize &s)
switch (loc) { switch (loc) {
case BottomEdge: case BottomEdge:
pos = QPoint(pos.x(), pos.y() - s.height()); pos = QPoint(pos.x(), v->geometry().y() - s.height());
break; break;
case TopEdge: case TopEdge:
pos = QPoint(pos.x(), pos.y() + (int)item->boundingRect().size().height()); pos = QPoint(pos.x(), v->geometry().bottom());
break; break;
case LeftEdge: case LeftEdge:
pos = QPoint(pos.x() + (int)item->boundingRect().size().width(), pos.y()); pos = QPoint(v->geometry().right(), pos.y());
break; break;
case RightEdge: case RightEdge:
pos = QPoint(pos.x() - s.width(), pos.y()); pos = QPoint(v->geometry().x() - s.width(), pos.y());
break; break;
default: default:
if (pos.y() - s.height() > 0) { if (pos.y() - s.height() > 0) {