Commit 92cb4fca authored by con's avatar con
Browse files

Use mini scrollbars for popups on Mac.

parent b8af05e6
......@@ -211,6 +211,12 @@ CompletionList::CompletionList(QWidget *parent)
// This is too slow when done on all results
//header()->setResizeMode(QHeaderView::ResizeToContents);
setWindowFlags(Qt::ToolTip);
#ifdef Q_WS_MAC
if (horizontalScrollBar())
horizontalScrollBar()->setAttribute(Qt::WA_MacMiniSize);
if (verticalScrollBar())
verticalScrollBar()->setAttribute(Qt::WA_MacMiniSize);
#endif
}
void CompletionList::updatePreferredSize()
......
......@@ -39,6 +39,7 @@
#include <QtGui/QDesktopWidget>
#include <QtGui/QKeyEvent>
#include <QtGui/QVBoxLayout>
#include <QtGui/QScrollBar>
#include <limits.h>
......@@ -227,6 +228,12 @@ CompletionListView::CompletionListView(CompletionSupport *support, ITextEditable
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setMinimumSize(1, 1);
setModel(m_model);
#ifdef Q_WS_MAC
if (horizontalScrollBar())
horizontalScrollBar()->setAttribute(Qt::WA_MacMiniSize);
if (verticalScrollBar())
verticalScrollBar()->setAttribute(Qt::WA_MacMiniSize);
#endif
}
CompletionListView::~CompletionListView()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment