diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2021-01-16 23:02:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-16 23:02:42 +0100 |
| commit | c48791a8a105d89cdbb8f4ac39557ed9cfd81800 (patch) | |
| tree | fb9aeb6aa05474dcad1a5fc9b21eb1af04f23778 /src/modlistversiondelegate.cpp | |
| parent | 8ee1f94b0f695be46abce2f76ee96035e1d79df7 (diff) | |
| parent | 9f8ba0ea5196bccf73f2f26a3dc8a55907faa02f (diff) | |
Merge pull request #1361 from Holt59/ui-fixes-and-others
UI fixes and others.
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(); |
