diff options
| author | Tannin <devnull@localhost> | 2014-11-11 21:52:50 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-11 21:52:50 +0100 |
| commit | efc77930adfa0022acdb4984f58e5dd3016751cd (patch) | |
| tree | 159ff1d05c6872768a8960a7e6c2f1f792174660 /src/mainwindow.cpp | |
| parent | 9494938534e3dc251cd1d462bb5b40b8d98103ef (diff) | |
| parent | 01265e9b0300cb4fe2dbed53050570ddee653da4 (diff) | |
Merge
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index cf7d70c3..d6d4ebe3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -226,8 +226,8 @@ MainWindow::MainWindow(const QString &exeName, QSettings &initSettings, QWidget ui->modList->header()->restoreState(initSettings.value("mod_list_state").toByteArray());
// hack: force the resize-signal to be triggered because restoreState doesn't seem to do that
- ui->modList->header()->resizeSection(ModList::COL_CONTENT, ui->modList->header()->sectionSize(ModList::COL_CONTENT) + 1);
- ui->modList->header()->resizeSection(ModList::COL_CONTENT, ui->modList->header()->sectionSize(ModList::COL_CONTENT) - 1);
+ ui->modList->header()->resizeSection(ModList::COL_CONTENT, sectionSize + 1);
+ ui->modList->header()->resizeSection(ModList::COL_CONTENT, sectionSize - 1);
} else {
// hide these columns by default
ui->modList->header()->setSectionHidden(ModList::COL_CONTENT, true);
@@ -399,6 +399,13 @@ void MainWindow::resizeLists(bool modListCustom, bool pluginListCustom) #endif
}
+ // ensure the columns aren't so small you can't see them any more
+ for (int i = 0; i < ui->modList->header()->count(); ++i) {
+ if (ui->modList->header()->sectionSize(i) < 10) {
+ ui->modList->header()->resizeSection(i, 10);
+ }
+ }
+
if (!pluginListCustom) {
// resize plugin list to fit content
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
