forked from qt-creator/qt-creator
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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user