forked from qt-creator/qt-creator
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:
@@ -259,7 +259,11 @@ void CompletionWidget::updatePositionAndSize(int startPos)
|
|||||||
// Determine the position, keeping the popup on the screen
|
// Determine the position, keeping the popup on the screen
|
||||||
const QRect cursorRect = m_editor->cursorRect(startPos);
|
const QRect cursorRect = m_editor->cursorRect(startPos);
|
||||||
const QDesktopWidget *desktop = QApplication::desktop();
|
const QDesktopWidget *desktop = QApplication::desktop();
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
const QRect screen = desktop->availableGeometry(desktop->screenNumber(this));
|
const QRect screen = desktop->availableGeometry(desktop->screenNumber(this));
|
||||||
|
#else
|
||||||
|
const QRect screen = desktop->screenGeometry(desktop->screenNumber(this));
|
||||||
|
#endif
|
||||||
|
|
||||||
QPoint pos = cursorRect.bottomLeft();
|
QPoint pos = cursorRect.bottomLeft();
|
||||||
pos.rx() -= 16 + frameWidth; // Space for the icons
|
pos.rx() -= 16 + frameWidth; // Space for the icons
|
||||||
|
|||||||
Reference in New Issue
Block a user