diff options
Diffstat (limited to 'src/plugins/coreplugin')
-rw-r--r-- | src/plugins/coreplugin/locator/locatorwidget.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index 61282cfb85..59f5e9b6a4 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -99,6 +99,14 @@ private: QColor mBackgroundColor; }; +class CompletionDelegate : public SearchResultTreeItemDelegate +{ +public: + CompletionDelegate(QObject *parent); + + QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; +}; + class CompletionList : public Utils::TreeView { public: @@ -234,7 +242,7 @@ void LocatorModel::addEntries(const QList<LocatorFilterEntry> &entries) CompletionList::CompletionList(QWidget *parent) : Utils::TreeView(parent) { - setItemDelegate(new SearchResultTreeItemDelegate(0, this)); + setItemDelegate(new CompletionDelegate(this)); setRootIsDecorated(false); setUniformRowHeights(true); header()->hide(); @@ -893,5 +901,15 @@ LocatorPopup *createLocatorPopup(Locator *locator, QWidget *parent) return popup; } +CompletionDelegate::CompletionDelegate(QObject *parent) + : SearchResultTreeItemDelegate(0, parent) +{ +} + +QSize CompletionDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const +{ + return SearchResultTreeItemDelegate::sizeHint(option, index) + QSize(0, 2); +} + } // namespace Internal } // namespace Core |