From 98683eca6f4b2668de875c14986657764e1123c7 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Thu, 7 Feb 2019 21:39:59 -0600 Subject: Enable compact mode for mod list flags when column is smaller than 6 icons --- src/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e4fe8769..fe39e023 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -283,7 +283,9 @@ MainWindow::MainWindow(QSettings &initSettings GenericIconDelegate *contentDelegate = new GenericIconDelegate(ui->modList, Qt::UserRole + 3, ModList::COL_CONTENT, 150); connect(ui->modList->header(), SIGNAL(sectionResized(int,int,int)), contentDelegate, SLOT(columnResized(int,int,int))); ui->modList->sortByColumn(ModList::COL_PRIORITY, Qt::AscendingOrder); - ui->modList->setItemDelegateForColumn(ModList::COL_FLAGS, new ModFlagIconDelegate(ui->modList)); + ModFlagIconDelegate *flagDelegate = new ModFlagIconDelegate(ui->modList, ModList::COL_FLAGS, 120); + connect(ui->modList->header(), SIGNAL(sectionResized(int,int,int)), flagDelegate, SLOT(columnResized(int,int,int))); + ui->modList->setItemDelegateForColumn(ModList::COL_FLAGS, flagDelegate); ui->modList->setItemDelegateForColumn(ModList::COL_CONTENT, contentDelegate); ui->modList->header()->installEventFilter(m_OrganizerCore.modList()); connect(ui->modList->header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(modListSectionResized(int, int, int))); -- cgit v1.3.1