SVN_SILENT: style fixes and death to the tabs

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=818737
This commit is contained in:
Marco Martin 2008-06-09 13:05:17 +00:00
parent ab395dfbbc
commit b8e211c2a4

View File

@ -117,17 +117,19 @@ void Dialog::position(QGraphicsView * view,const QRectF boundingRect,QPointF sce
if (view) { if (view) {
QPoint viewPos = view->mapFromScene(scenePos); QPoint viewPos = view->mapFromScene(scenePos);
QPoint globalPos = view->mapToGlobal(viewPos); QPoint globalPos = view->mapToGlobal(viewPos);
if ((globalPos.ry()-height())< 0) { if ((globalPos.ry()-height())< 0) {
scenePos = QPointF(scenePos.x() + boundingRect.width(), scenePos.y() + boundingRect.height()); scenePos = QPointF(scenePos.x() + boundingRect.width(), scenePos.y() + boundingRect.height());
viewPos = view->mapFromScene(scenePos); viewPos = view->mapFromScene(scenePos);
globalPos = view->mapToGlobal(viewPos)+QPoint(0,10); globalPos = view->mapToGlobal(viewPos)+QPoint(0,10);
} } else {
else {
globalPos.ry() -= (height()+10); globalPos.ry() -= (height()+10);
} }
if ((globalPos.rx() + width()) > view->width()) { if ((globalPos.rx() + width()) > view->width()) {
globalPos.rx()-=((globalPos.rx() + width())-view->width()); globalPos.rx()-=((globalPos.rx() + width())-view->width());
} }
move(globalPos); move(globalPos);
kDebug() << globalPos; kDebug() << globalPos;
} }