Skip to content

Commit 281da0b

Browse files
committed
GUI resizing tweak
1 parent f3db212 commit 281da0b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bidscoin/bidseditor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def setupUi(self, MainWindow, bidsfolder, bidsmap_filename, input_bidsmap, outpu
229229

230230
# Restore the samples_table stretching after the main window has been sized / current tabindex has been set (otherwise the main window can become too narrow)
231231
header = self.samples_table.horizontalHeader()
232-
header.setSectionResizeMode(1, QHeaderView.Stretch)
232+
header.setSectionResizeMode(1, QHeaderView.Interactive)
233+
header.setSectionResizeMode(3, QHeaderView.Stretch)
233234

234235
if not reload:
235236
self.setObjectName('MainWindow')
@@ -708,9 +709,9 @@ def set_tab_bidsmap(self):
708709
samples_table.itemDoubleClicked.connect(self.inspect_sourcefile)
709710
header = samples_table.horizontalHeader()
710711
header.setSectionResizeMode(0, QHeaderView.ResizeToContents)
711-
header.setSectionResizeMode(1, QHeaderView.ResizeToContents) # Temporarily set it to ResizeToContents to have Qt set the right window width -> set to Stretch in setupUI -> not reload
712+
header.setSectionResizeMode(1, QHeaderView.Stretch) # Temporarily set it to Stretch to have Qt set the right window width -> set to Stretch in setupUI -> not reload
712713
header.setSectionResizeMode(2, QHeaderView.ResizeToContents)
713-
header.setSectionResizeMode(3, QHeaderView.Stretch)
714+
header.setSectionResizeMode(3, QHeaderView.ResizeToContents)
714715
header.setSectionResizeMode(4, QHeaderView.ResizeToContents)
715716

716717
self.update_subses_and_samples(self.output_bidsmap)

0 commit comments

Comments
 (0)