Editor: Limit size of generic proposal widget.

Task-number: QTCREATORBUG-14331
Change-Id: I3a120c82628e3cd43f9abc3c97021a3674300fbc
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
David Schulz
2015-04-28 07:11:54 +02:00
parent e4e9983622
commit e75620c60d

View File

@@ -531,10 +531,10 @@ void GenericProposalWidget::updatePositionAndSize()
QPoint pos = d->m_displayRect.bottomLeft();
pos.rx() -= 16 + fw; // Space for the icons
if (pos.y() + height > screen.bottom())
pos.setY(d->m_displayRect.top() - height);
pos.setY(qMax(0, d->m_displayRect.top() - height));
if (pos.x() + width > screen.right())
pos.setX(screen.right() - width);
setGeometry(pos.x(), pos.y(), width, height);
pos.setX(qMax(0, screen.right() - width));
setGeometry(pos.x(), pos.y(), qMin(width, screen.width()), qMin(height, screen.height()));
}
void GenericProposalWidget::turnOffAutoWidth()