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:
@@ -535,3 +535,17 @@ def test_import_shazams_end_to_end(window, qapp, monkeypatch):
|
||||
[track] = library.tracks.values()
|
||||
assert track.name == "Alpha (AcoustID)"
|
||||
assert shazam_window.status("n").startswith("Couldn't import")
|
||||
|
||||
|
||||
def test_every_column_edge_can_be_dragged(qapp):
|
||||
# A Stretch column beside the last one left no edge to drag, so a long
|
||||
# "Couldn't import: …" was cut off for good (v0.73.2).
|
||||
from PyQt6.QtWidgets import QHeaderView
|
||||
from lintunes.gui import shazam_import as ui
|
||||
window = ui.ShazamImportWindow([_song("a")])
|
||||
preview = ui.ShazamPreviewDialog(_Reader([_song("a")]), set(), [], None)
|
||||
for tree in (window._tree, preview._tree):
|
||||
header = tree.header()
|
||||
for i in range(header.count() - 1):
|
||||
assert header.sectionResizeMode(i) == QHeaderView.ResizeMode.Interactive
|
||||
assert header.stretchLastSection()
|
||||
|
||||
Reference in New Issue
Block a user