- The shelf is revealed in place: the decks don't stretch or squeeze as the window parts. - The DJ button is the top row's last box (where bpm was), so it stays put; bpm moved under it. - Tempo, vocals and the crossfader snap to their middle and show it. The vocals slider has icons, lined up with its ends and middle. - Sync sticks: a synced deck follows the other's tempo, glows and says Synced until its own tempo fader moves. The ½×/1×/2× switch re-syncs, and the BPM line says when it's counted half or double. - A back-to-the-start button per deck. - The air horn is a real recording (CC0): tap for the phrase, hold to stretch the first blast. - The zoomed waveforms ease out while a deck is paused or held. - DJ audio follows a change of output device instead of going silent. - A new playlist folder is named in place, scrolled into view. - Visualizer bars: choose how many, 1 to 1024 (one per pixel at most). - The volume slider is as tall as the scrubber.
28 lines
1.2 KiB
Python
28 lines
1.2 KiB
Python
"""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.dj_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)
|
|
slider_top = bar._slider.mapTo(bar, bar._slider.rect().topLeft()).y()
|
|
assert slider_top > bar._now_playing.geometry().bottom()
|