v0.73.2: Import Shazams' columns can be resized

The song column was Stretch beside the last column, so there was no edge
to drag and a long "Couldn't import: …" stayed cut off. Every edge now
drags and the last column (status / note) takes what's left.
This commit is contained in:
2026-10-20 22:29:16 -07:00
parent b76a69f504
commit 5f985929bf
3 changed files with 25 additions and 9 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
"""LinTunes — iTunes-style music library manager and player for Linux."""
__version__ = "0.73.1"
__version__ = "0.73.2"
+10 -8
View File
@@ -50,10 +50,11 @@ class ShazamPreviewDialog(QDialog):
self._tree.setRootIsDecorated(False)
self._tree.setUniformRowHeights(True)
header = self._tree.header()
header.setSectionResizeMode(0, QHeaderView.ResizeMode.Stretch)
header.setSectionResizeMode(1, QHeaderView.ResizeMode.ResizeToContents)
header.setSectionResizeMode(2, QHeaderView.ResizeMode.ResizeToContents)
header.setStretchLastSection(False)
# Every boundary drags; the note takes what's left.
header.setSectionResizeMode(QHeaderView.ResizeMode.Interactive)
header.resizeSection(0, 420)
header.resizeSection(1, 150)
header.setStretchLastSection(True)
self._tree.itemChanged.connect(self._refresh_button)
layout.addWidget(self._tree, 1)
@@ -193,10 +194,11 @@ class ShazamImportWindow(QDialog):
self._tree.setRootIsDecorated(False)
self._tree.setUniformRowHeights(True)
header = self._tree.header()
header.setSectionResizeMode(0, QHeaderView.ResizeMode.Stretch)
header.setSectionResizeMode(1, QHeaderView.ResizeMode.Interactive)
header.resizeSection(1, 230)
header.setStretchLastSection(False)
# The song's edge drags; the status (a long reason, often) takes
# what's left.
header.setSectionResizeMode(QHeaderView.ResizeMode.Interactive)
header.resizeSection(0, 420)
header.setStretchLastSection(True)
for song in songs:
item = QTreeWidgetItem([song.label(), WAITING])
item.setToolTip(0, f"{song.label()}\nShazamed {_when(song)}")