From 734bd0ed20196206364d87c584dce3e1e498f4cd Mon Sep 17 00:00:00 2001 From: AL Date: Thu, 9 Jan 2020 02:00:50 +0100 Subject: List all categories flatly in filters view as nestled ones would otherwise not be accessible. --- src/filterlist.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/filterlist.cpp') diff --git a/src/filterlist.cpp b/src/filterlist.cpp index 69aca4c5..4287869d 100644 --- a/src/filterlist.cpp +++ b/src/filterlist.cpp @@ -225,11 +225,9 @@ QTreeWidgetItem* FilterList::addCriteriaItem( { auto* item = new CriteriaItem(this, name, type, categoryID); - if (root != nullptr) { - root->addChild(item); - } else { - ui->filters->addTopLevelItem(item); - } + // For now list all categories flatly without nestling them as there is + // no way to espand nodes in the filter view since clicking changes state. + ui->filters->addTopLevelItem(item); item->setTextAlignment(0, Qt::AlignCenter); -- cgit v1.3.1 From 3c6804c502e760f28113af06c735fb8bb804d249 Mon Sep 17 00:00:00 2001 From: AL Date: Thu, 9 Jan 2020 02:02:24 +0100 Subject: Add headers with tooltips to Filter view. --- src/filterlist.cpp | 2 +- src/mainwindow.ui | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/filterlist.cpp') diff --git a/src/filterlist.cpp b/src/filterlist.cpp index 4287869d..a0928fcc 100644 --- a/src/filterlist.cpp +++ b/src/filterlist.cpp @@ -199,7 +199,7 @@ FilterList::FilterList(Ui::MainWindow* ui, CategoryFactory& factory) [&]{ onOptionsChanged(); }); ui->filters->header()->setMinimumSectionSize(0); - ui->filters->header()->setSectionResizeMode(0, QHeaderView::Fixed); + ui->filters->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents); ui->filters->header()->resizeSection(0, 30); ui->categoriesSplitter->setCollapsible(0, false); ui->categoriesSplitter->setCollapsible(1, false); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index a7e7b937..d0daafc0 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -101,19 +101,25 @@ true - false + true false - + State + + + State of the filter, can either be Disabled, Enabled or Inverted. - Category + Filter + + + Filter to apply to the modlist. -- cgit v1.3.1