summaryrefslogtreecommitdiff
path: root/src/pluginlistview.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-01 13:51:36 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:19 +0100
commite5f43788e874e638e1d4dbab20451c36e52df10d (patch)
tree9191bae2dce4cb69bd9c5bfa0099a4f8981a50d1 /src/pluginlistview.cpp
parentf36c68332019ec68a713b21519c0439039845fa1 (diff)
Visual fixes for the modlist.
- Fix invalid positions of markers in the scrollbar. - Use color from children for collapsed elements (background and markers).
Diffstat (limited to 'src/pluginlistview.cpp')
-rw-r--r--src/pluginlistview.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/pluginlistview.cpp b/src/pluginlistview.cpp
index 589c5737..d17b4a2f 100644
--- a/src/pluginlistview.cpp
+++ b/src/pluginlistview.cpp
@@ -21,19 +21,13 @@ using namespace MOBase;
PluginListView::PluginListView(QWidget *parent)
: QTreeView(parent)
, m_sortProxy(nullptr)
- , m_Scrollbar(new ViewMarkingScrollBar(this->model(), Qt::BackgroundRole, this))
+ , m_Scrollbar(new ViewMarkingScrollBar(this, Qt::BackgroundRole))
, m_didUpdateMasterList(false)
{
setVerticalScrollBar(m_Scrollbar);
MOBase::setCustomizableColumns(this);
}
-void PluginListView::setModel(QAbstractItemModel *model)
-{
- QTreeView::setModel(model);
- setVerticalScrollBar(new ViewMarkingScrollBar(model, Qt::BackgroundRole, this));
-}
-
int PluginListView::sortColumn() const
{
return m_sortProxy ? m_sortProxy->sortColumn() : -1;
@@ -41,22 +35,22 @@ int PluginListView::sortColumn() const
QModelIndex PluginListView::indexModelToView(const QModelIndex& index) const
{
- return ::indexModelToView(index, this);
+ return MOShared::indexModelToView(index, this);
}
QModelIndexList PluginListView::indexModelToView(const QModelIndexList& index) const
{
- return ::indexModelToView(index, this);
+ return MOShared::indexModelToView(index, this);
}
QModelIndex PluginListView::indexViewToModel(const QModelIndex& index) const
{
- return ::indexViewToModel(index, m_core->pluginList());
+ return MOShared::indexViewToModel(index, m_core->pluginList());
}
QModelIndexList PluginListView::indexViewToModel(const QModelIndexList& index) const
{
- return ::indexViewToModel(index, m_core->pluginList());
+ return MOShared::indexViewToModel(index, m_core->pluginList());
}
void PluginListView::updatePluginCount()