summaryrefslogtreecommitdiff
path: root/src/modlistview.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-03 01:44:39 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-03 01:44:39 +0100
commite96a1f3ced974b5d1b02907bf9feabca97d2baa9 (patch)
treecce4230f65796a2a19656021b06072f096328ffc /src/modlistview.cpp
parentc8eb3f6e052852fc8440efe2f8257119a714789e (diff)
Fix indentation of indicators branches when using collapsible separators.
Diffstat (limited to 'src/modlistview.cpp')
-rw-r--r--src/modlistview.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp
index 778b228d..c2942717 100644
--- a/src/modlistview.cpp
+++ b/src/modlistview.cpp
@@ -853,6 +853,15 @@ QRect ModListView::visualRect(const QModelIndex& index) const
return rect;
}
+void ModListView::drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const
+{
+ QRect r(rect);
+ if (hasCollapsibleSeparators() && index.parent().isValid()) {
+ r.adjust(-indentation(), 0, 0 -indentation(), 0);
+ }
+ QTreeView::drawBranches(painter, r, index);
+}
+
QModelIndexList ModListView::selectedIndexes() const
{
// during drag&drop events, we fake the return value of selectedIndexes()