Skip to content

Commit

Permalink
Fix Build Settings icon column size issue (vkbo#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo authored Oct 23, 2023
2 parents ddd5e84 + bce6f95 commit 2d78312
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions novelwriter/tools/manussettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,16 @@ def __init__(self, buildMain: GuiBuildSettings, build: BuildSettings) -> None:

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
# =======
Expand Down Expand Up @@ -390,11 +392,11 @@ def __init__(self, buildMain: GuiBuildSettings, build: BuildSettings) -> None:
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()
Expand Down

0 comments on commit 2d78312

Please sign in to comment.