correct positioning in vertical panels

This commit is contained in:
Marco Martin 2014-02-28 14:33:52 +01:00
parent c615013d96
commit f4225e95c2

View File

@ -378,12 +378,13 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, const QSize &size, Qt::Align
dialogPos.setY(bottomPoint.y());
}
}
if (dialogPos.y() + size.height() > avail.bottom()) {
// hitting bottom
if (m_location == Plasma::Types::TopEdge || m_location == Plasma::Types::BottomEdge) {
dialogPos.setY(topPoint.y());
} else {
dialogPos.setY(avail.bottom() - item->boundingRect().height());
dialogPos.setY(avail.bottom() - size.height());
}
}