v0.24.1: bpm box in line with the now-playing panel

The boxed controls were centered on the whole bar while the now-playing
panel hung from its top, so the bpm box sat ~11px below the panel beside
it. The panel is now CONTROL_HEIGHT tall and every control shares its top
edge; the seek row hangs under the panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 23:56:19 -07:00
co-authored by Claude Opus 5.5
parent 372946c79f
commit 720f5c10a2
4 changed files with 56 additions and 20 deletions
+4 -1
View File
@@ -875,6 +875,7 @@ class TestTransportLayout:
bar.resize(1200, BAR_HEIGHT)
bar.show()
idle_y = bar._volume_slider.pos().y()
idle_height = bar.sizeHint().height()
# The visualizer panel doubles as the cast indicator, so connecting
# adds no widget and nothing moves.
@@ -882,7 +883,9 @@ class TestTransportLayout:
bar.layout().activate()
assert bar._volume_slider.pos().y() == idle_y
assert bar.sizeHint().height() <= BAR_HEIGHT
# Compared with idle rather than BAR_HEIGHT: the seek row's time
# labels follow the app font, which other tests may have scaled up.
assert bar.sizeHint().height() == idle_height
bar.hide()
def test_clicking_the_visualizer_while_casting_disconnects(
+26
View File
@@ -0,0 +1,26 @@
"""Round 62: the bpm box lines up with the rest of the transport bar.
The boxed controls (transport, shuffle, visualizer, bpm) were centered on the
whole bar while the now-playing panel hung from its top, so the bpm box sat
~11px lower than the panel right beside it. Now the panel is CONTROL_HEIGHT
tall and every control shares its top edge; the seek row sits under the panel.
"""
from tests.test_round21 import _build_bar
from lintunes.gui.transport import CONTROL_HEIGHT
def test_every_control_shares_the_now_playing_row(qapp, tmp_path):
bar = _build_bar(qapp, tmp_path)
panel = bar._now_playing.geometry()
assert panel.height() == CONTROL_HEIGHT
for widget in (bar._prev_btn.parentWidget(), bar._shuffle_btn.parentWidget(),
bar._visualizer, bar._volume_slider,
bar._bpm_button.parentWidget()):
g = widget.geometry()
assert (g.top(), g.bottom()) == (panel.top(), panel.bottom())
def test_seek_row_hangs_under_the_panel(qapp, tmp_path):
bar = _build_bar(qapp, tmp_path)
assert bar._slider.geometry().top() > bar._now_playing.geometry().bottom()