From df9b3a47f125e65c5610c62a14894c8c7514f954 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 3 Aug 2026 14:58:45 +0200 Subject: fix: let the thread list columns be resized again Tags, Date and From were set to ResizeToContents while fixing the pushed-off-screen Tags column. That mode computes the width itself and discards a drag, so the columns stopped being resizable. Verified: with ResizeToContents a request for 250px yields 150, with Stretch 478, with Interactive 250. The reorder alone already fixed the original bug, since Subject stretches and is last, so nothing can be pushed past it. Locking the other three was unnecessary and also blocked the saved-column-widths item, which needs widths a user can actually set. They are Interactive again, with starting widths a drag overrides. --- src/mainwindow.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 915c1ae..bebe379 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -169,16 +169,21 @@ void MainWindow::buildUi() m_threadView->setSelectionMode(QAbstractItemView::ExtendedSelection); m_threadView->verticalHeader()->hide(); m_threadView->horizontalHeader()->setStretchLastSection(false); - // Subject is the last column and takes the leftover width; the three - // fixed-width ones size to their contents. Nothing sits to the right of - // the stretching column, so no column can be pushed out of view. + // Subject is last and takes the leftover width, so no column can be + // pushed off the right edge. The other three stay Interactive: both + // ResizeToContents and Stretch ignore a drag, and the user resizes these. m_threadView->horizontalHeader()->setSectionResizeMode( ThreadListModel::SubjectColumn, QHeaderView::Stretch); for (int column : { ThreadListModel::TagsColumn, ThreadListModel::DateColumn, ThreadListModel::AuthorsColumn }) { m_threadView->horizontalHeader()->setSectionResizeMode( - column, QHeaderView::ResizeToContents); + column, QHeaderView::Interactive); } + // Starting widths only; a drag overrides them, and they are what the + // saved-widths item will persist. + m_threadView->setColumnWidth(ThreadListModel::TagsColumn, 160); + m_threadView->setColumnWidth(ThreadListModel::DateColumn, 130); + m_threadView->setColumnWidth(ThreadListModel::AuthorsColumn, 180); connect(m_threadView->selectionModel(), &QItemSelectionModel::currentRowChanged, -- cgit v1.2.3