v0.31.4: wider now-playing panel, tighter knolled top row

The now-playing panel (and the seek row under it) caps at 700px, up from
560. The top row gets one equal gap before, between and after its
controls, capped at 28px; past that the extra splits between the two
ends, so the row sits centered instead of spreading out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-28 22:51:05 -07:00
co-authored by Claude Opus 5.5
parent 43d7b91aa6
commit d5cdddee33
3 changed files with 52 additions and 20 deletions
+19
View File
@@ -113,3 +113,22 @@ def test_long_name_shrinks_then_elides(qapp):
assert label.font().pointSize() >= base - 2
assert label.text().endswith("…")
assert label.toolTip() == label.full_text()
def test_row_is_knolled_with_equal_gaps_and_ends(qapp, tmp_path):
from lintunes.gui.transport import MAX_GAP, MIN_GAP
window = _window(qapp, tmp_path)
bar = window._transport
for width in (900, 1280, 1800):
window.resize(width, 500)
qapp.processEvents()
row = [bar._prev_btn.parentWidget(), bar._shuffle_btn.parentWidget(),
bar._visualizer, bar._volume_slider, bar._now_playing,
bar._bpm_button.parentWidget()]
edges = [(w.geometry().left(), w.geometry().right()) for w in row]
gaps = [b[0] - a[1] - 1 for a, b in zip(edges, edges[1:])]
assert max(gaps) - min(gaps) <= 1
assert MIN_GAP <= gaps[0] <= MAX_GAP
left_end, right_end = edges[0][0], bar.width() - 1 - edges[-1][1]
assert abs(left_end - right_end) <= 1
assert left_end >= gaps[0] - 1