off by one in positioning

position the dialog at exactly the right-most edge of the screen
it was off by exactly one pixel
This commit is contained in:
Marco Martin 2014-06-13 13:54:23 +02:00
parent bb40981c1f
commit c44c3b30e2

View File

@ -682,7 +682,7 @@ QPoint Dialog::popupPosition(QQuickItem *item, const QSize &size)
if (dialogPos.x() + size.width() > avail.right()) {
// popup hits rhs
if (d->location == Plasma::Types::TopEdge || d->location == Plasma::Types::BottomEdge) {
dialogPos.setX(avail.right() - size.width());
dialogPos.setX(avail.right() - size.width() + 1);
} else {
dialogPos.setX(leftPoint.x());
}
@ -701,7 +701,7 @@ QPoint Dialog::popupPosition(QQuickItem *item, const QSize &size)
if (d->location == Plasma::Types::TopEdge || d->location == Plasma::Types::BottomEdge) {
dialogPos.setY(topPoint.y());
} else {
dialogPos.setY(avail.bottom() - size.height());
dialogPos.setY(avail.bottom() - size.height() + 1);
}
}