v0.45.1: the laser's Afterimage is a number box, like Line width

Type the seconds, or step by 0.05 with the arrows or ↑/↓; it reads "Off"
at zero. Line width and Afterimage now share one number-box helper.
This commit is contained in:
2026-10-10 02:24:17 -07:00
parent 43d2d21d9d
commit c312751c86
4 changed files with 40 additions and 18 deletions
+13
View File
@@ -282,3 +282,16 @@ class TestCopyAsText:
from lintunes.gui.track_table import song_line
from lintunes.models import Track
assert song_line(Track(track_id=9, name="", artist="X")) == "X - Untitled"
class TestAfterimageBox:
def test_steps_by_a_twentieth_and_reads_off_at_zero(self, qapp, tmp_path):
prefs = Preferences(tmp_path)
box = _prefs_dialog(prefs)._laser_fade_box
assert box.value() == pytest.approx(0.1) # the default
box.stepUp()
assert prefs.get("visualizer_laser_afterimage") == pytest.approx(0.15)
box.setValue(0)
assert box.text() == "Off"
box.setValue(99) # past the top
assert box.value() == 3.0