v0.72.0: View › Dark Mode (Ctrl+Shift+D)

This commit is contained in:
2026-10-19 23:07:20 -07:00
parent 481e6eec9d
commit 2c379c4229
3 changed files with 29 additions and 1 deletions
+14
View File
@@ -89,3 +89,17 @@ def test_the_x_shows_while_splitting_and_the_slider_retries(shelf, monkeypatch):
assert not x.isHidden()
slider.sliderPressed.emit() # already splitting: no second ask
assert asked == ["/x.mp3", "/x.mp3"]
def test_view_menu_dark_mode_toggles_and_follows(qapp, tmp_path):
from tests.test_round69 import _window
from lintunes import theme
from lintunes.preferences import Preferences
window = _window(qapp, tmp_path)
action = window._dark_action
assert action.shortcut().toString() == "Ctrl+Shift+D"
action.trigger()
assert window._prefs.get("dark_mode") is True
window._prefs.set("dark_mode", False) # e.g. the toolbar button
assert not action.isChecked()
theme.apply_theme(qapp, Preferences(tmp_path / "light"))