Allow some more space for popup on most desktops

Most desktops allow popups to overlap the taskbar. We should allow this
additional space to be used by the completion popup.
This commit is contained in:
Thorbjørn Lindeijer
2008-12-19 17:53:21 +01:00
parent 89985c3d1c
commit d02211674a

View File

@@ -259,7 +259,11 @@ void CompletionWidget::updatePositionAndSize(int startPos)
// Determine the position, keeping the popup on the screen
const QRect cursorRect = m_editor->cursorRect(startPos);
const QDesktopWidget *desktop = QApplication::desktop();
#ifdef Q_OS_MAC
const QRect screen = desktop->availableGeometry(desktop->screenNumber(this));
#else
const QRect screen = desktop->screenGeometry(desktop->screenNumber(this));
#endif
QPoint pos = cursorRect.bottomLeft();
pos.rx() -= 16 + frameWidth; // Space for the icons