SVN_SILENT: style fixes and death to the tabs
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=818737
This commit is contained in:
parent
ab395dfbbc
commit
b8e211c2a4
32
dialog.cpp
32
dialog.cpp
@ -115,21 +115,23 @@ void Dialog::position(QGraphicsSceneEvent *event, const QRectF boundingRect, QPo
|
|||||||
void Dialog::position(QGraphicsView * view,const QRectF boundingRect,QPointF scenePos)
|
void Dialog::position(QGraphicsView * view,const QRectF boundingRect,QPointF scenePos)
|
||||||
{
|
{
|
||||||
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) {
|
|
||||||
scenePos = QPointF(scenePos.x() + boundingRect.width(), scenePos.y() + boundingRect.height());
|
if ((globalPos.ry()-height())< 0) {
|
||||||
viewPos = view->mapFromScene(scenePos);
|
scenePos = QPointF(scenePos.x() + boundingRect.width(), scenePos.y() + boundingRect.height());
|
||||||
globalPos = view->mapToGlobal(viewPos)+QPoint(0,10);
|
viewPos = view->mapFromScene(scenePos);
|
||||||
}
|
globalPos = view->mapToGlobal(viewPos)+QPoint(0,10);
|
||||||
else {
|
} else {
|
||||||
globalPos.ry() -= (height()+10);
|
globalPos.ry() -= (height()+10);
|
||||||
}
|
}
|
||||||
if ((globalPos.rx() + width()) > view->width()) {
|
|
||||||
globalPos.rx()-=((globalPos.rx() + width())-view->width());
|
if ((globalPos.rx() + width()) > view->width()) {
|
||||||
}
|
globalPos.rx()-=((globalPos.rx() + width())-view->width());
|
||||||
move(globalPos);
|
}
|
||||||
kDebug() << globalPos;
|
|
||||||
|
move(globalPos);
|
||||||
|
kDebug() << globalPos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user