From bce6f9543a7db150ce595292849fd38a97b8a349 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 23 Oct 2023 23:58:29 +0200 Subject: [PATCH] Make sure icon columns on build settings dialog are narrow (#1551) --- novelwriter/tools/manussettings.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/novelwriter/tools/manussettings.py b/novelwriter/tools/manussettings.py index 842114a9..c4b211fb 100644 --- a/novelwriter/tools/manussettings.py +++ b/novelwriter/tools/manussettings.py @@ -332,14 +332,16 @@ class _FilterTab(QWidget): treeHeader = self.optTree.header() treeHeader.setStretchLastSection(False) + treeHeader.setMinimumSectionSize(iPx + cMg) # See Issue #1551 treeHeader.setSectionResizeMode(self.C_NAME, QHeaderView.Stretch) treeHeader.setSectionResizeMode(self.C_ACTIVE, QHeaderView.Fixed) treeHeader.setSectionResizeMode(self.C_STATUS, QHeaderView.Fixed) treeHeader.resizeSection(self.C_ACTIVE, iPx + cMg) treeHeader.resizeSection(self.C_STATUS, iPx + cMg) - self.optTree.setSelectionMode(QAbstractItemView.ExtendedSelection) self.optTree.setDragDropMode(QAbstractItemView.NoDragDrop) + self.optTree.setSelectionMode(QAbstractItemView.ExtendedSelection) + self.optTree.setSelectionBehavior(QAbstractItemView.SelectRows) # Filters # ======= @@ -390,11 +392,11 @@ class _FilterTab(QWidget): self.mainSplit.addWidget(self.filterOpt) self.mainSplit.setCollapsible(0, False) self.mainSplit.setCollapsible(1, False) - self.mainSplit.setStretchFactor(0, 0) - self.mainSplit.setStretchFactor(1, 1) + self.mainSplit.setStretchFactor(0, 1) + self.mainSplit.setStretchFactor(1, 0) self.mainSplit.setSizes([ - CONFIG.pxInt(pOptions.getInt("GuiBuildSettings", "treeWidth", 1)), - CONFIG.pxInt(pOptions.getInt("GuiBuildSettings", "filterWidth", 1)) + CONFIG.pxInt(pOptions.getInt("GuiBuildSettings", "treeWidth", 300)), + CONFIG.pxInt(pOptions.getInt("GuiBuildSettings", "filterWidth", 300)) ]) self.outerBox = QHBoxLayout()