From be2ae212edeaed0912d752b24563f1166c12504c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 12 Dec 2008 20:14:01 +0000 Subject: [PATCH] don't cover the applet when the popup if from a top panel BUG: 177621 svn path=/trunk/KDE/kdelibs/; revision=896197 --- corona.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/corona.cpp b/corona.cpp index 90ef6b1b9..274fbee22 100644 --- a/corona.cpp +++ b/corona.cpp @@ -494,11 +494,11 @@ QPoint Corona::popupPosition(const QGraphicsItem *item, const QSize &s) screenGeometry((pv && pv->containment()) ? pv->containment()->screen() : -1); //kDebug() << "==> rect for" << (pv ? pv->containment()->screen() : -1) << "is" << screenRect; - if (pos.rx() + s.width() > screenRect.right()) { + if (loc != LeftEdge && pos.rx() + s.width() > screenRect.right()) { pos.rx() -= ((pos.rx() + s.width()) - screenRect.right()); } - if (pos.ry() + s.height() > screenRect.bottom()) { + if (loc != TopEdge && pos.ry() + s.height() > screenRect.bottom()) { pos.ry() -= ((pos.ry() + s.height()) - screenRect.bottom()); }