diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2008-12-19 17:53:21 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2008-12-19 17:54:42 +0100 |
commit | d02211674a3e71f594d08f7c66715add31a94bf1 (patch) | |
tree | 236998b8e1e25f8d654f11230b4868834e88bd5c /src/plugins/texteditor/completionwidget.cpp | |
parent | 89985c3d1c1e9a107585b450e63e399fa552b3a8 (diff) | |
download | qt-creator-d02211674a3e71f594d08f7c66715add31a94bf1.tar.gz |
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.
Diffstat (limited to 'src/plugins/texteditor/completionwidget.cpp')
-rw-r--r-- | src/plugins/texteditor/completionwidget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/texteditor/completionwidget.cpp b/src/plugins/texteditor/completionwidget.cpp index f9057d3907..2b2f8520e7 100644 --- a/src/plugins/texteditor/completionwidget.cpp +++ b/src/plugins/texteditor/completionwidget.cpp @@ -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 |