a few lingering bits of dialog layout code, not enabled

This commit is contained in:
Sebastian Kügler 2013-02-25 16:48:04 +01:00
parent 1649761e0d
commit 9e8f112be0

View File

@ -223,12 +223,18 @@ QPoint DialogProxy::popupPosition(QQuickItem *item, Qt::AlignmentFlag alignment)
// align our item's vertical center with our own vertical center // align our item's vertical center with our own vertical center
_y = (item->y() + item->height()/2) - height()/2; _y = (item->y() + item->height()/2) - height()/2;
} else { } else {
// Location is left or right // Location is left or right
_y = item->y() - (height() - item->height()/2);
if (location() == Qt::AlignLeft) {
_x = item->x() - width();
} else if (location() == Qt::AlignRight) {
_x = item->x() + item->width();
} else {
qDebug() << "Neither left nor right. I'm confused.";
}
} }
// Correct position for screen geometry
if (alignment == Qt::AlignCenter) { if (alignment == Qt::AlignCenter) {
xOffset = item->boundingRect().width()/2 - width()/2; xOffset = item->boundingRect().width()/2 - width()/2;