From f706328e4df99efaad7eee8cb057d2d484573155 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Thu, 12 Feb 2026 14:04:22 +0100 Subject: [PATCH] Fix column resize: switch from ResizeToContents to Interactive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ResizeToContents columns can't be dragged — they snap back to their computed width, making resize attempts feel broken. Changed to Interactive mode with explicit initial widths and minimum section size so columns are freely draggable while still having sensible defaults. Co-Authored-By: Claude Opus 4.6 --- ui/main_window.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ui/main_window.py b/ui/main_window.py index 8510ee4..ba0b9f2 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -500,10 +500,14 @@ class SequenceLinkerUI(QWidget): self.file_list.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) self.file_list.setRootIsDecorated(False) self.file_list.header().setStretchLastSection(False) - self.file_list.header().setSectionResizeMode(0, QHeaderView.ResizeMode.ResizeToContents) + self.file_list.header().setSectionResizeMode(0, QHeaderView.ResizeMode.Interactive) self.file_list.header().setSectionResizeMode(1, QHeaderView.ResizeMode.Stretch) - self.file_list.header().setSectionResizeMode(2, QHeaderView.ResizeMode.ResizeToContents) - self.file_list.header().setSectionResizeMode(3, QHeaderView.ResizeMode.ResizeToContents) + self.file_list.header().setSectionResizeMode(2, QHeaderView.ResizeMode.Interactive) + self.file_list.header().setSectionResizeMode(3, QHeaderView.ResizeMode.Interactive) + self.file_list.header().resizeSection(0, 120) + self.file_list.header().resizeSection(2, 150) + self.file_list.header().resizeSection(3, 50) + self.file_list.header().setMinimumSectionSize(40) self.file_list.setToolTip("Drag to reorder within folder, Del to remove") # Action buttons @@ -642,7 +646,9 @@ class SequenceLinkerUI(QWidget): self.sequence_table.header().setStretchLastSection(False) self.sequence_table.header().setSectionResizeMode(0, QHeaderView.ResizeMode.Stretch) self.sequence_table.header().setSectionResizeMode(1, QHeaderView.ResizeMode.Stretch) - self.sequence_table.header().setSectionResizeMode(2, QHeaderView.ResizeMode.ResizeToContents) + self.sequence_table.header().setSectionResizeMode(2, QHeaderView.ResizeMode.Interactive) + self.sequence_table.header().resizeSection(2, 50) + self.sequence_table.header().setMinimumSectionSize(40) # Cross-dissolve transition settings group - horizontal layout self.transition_group = QGroupBox("Cross-Dissolve Transitions")