diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-14 21:16:56 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-14 21:16:56 +0100 |
| commit | 7d027a446d61c9aa46365486f03755bf8a6db9d2 (patch) | |
| tree | 73b35cb174e98fec076c3031a820933983f10c83 /src/modlistversiondelegate.cpp | |
| parent | 38129e6e7760ffcb660de88e7b87e691e16a49df (diff) | |
Add settings to enable/disable icons on collapsed separators.
Diffstat (limited to 'src/modlistversiondelegate.cpp')
| -rw-r--r-- | src/modlistversiondelegate.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modlistversiondelegate.cpp b/src/modlistversiondelegate.cpp index 657718f5..5ce574a5 100644 --- a/src/modlistversiondelegate.cpp +++ b/src/modlistversiondelegate.cpp @@ -1,10 +1,13 @@ #include "modlistversiondelegate.h" +#include "settings.h" #include "modlistview.h" #include "log.h" -ModListVersionDelegate::ModListVersionDelegate(ModListView* view) : - QItemDelegate(view), m_view(view) { } +ModListVersionDelegate::ModListVersionDelegate(ModListView* view, Settings& settings) : + QItemDelegate(view), m_view(view), m_settings(settings) +{ +} void ModListVersionDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const @@ -13,6 +16,7 @@ void ModListVersionDelegate::paint(QPainter* painter, const QStyleOptionViewItem if (m_view->hasCollapsibleSeparators() && m_view->model()->hasChildren(index) + && m_settings.interface().collapsibleSeparatorsIcons(ModList::COL_VERSION) && !m_view->isExpanded(index.sibling(index.row(), 0))) { auto* model = m_view->model(); |
