convert to markdown

This commit is contained in:
Miguel Jacq 2025-11-08 17:29:36 +11:00
parent 31604a0cd2
commit 6a9d2c4bcc
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
54 changed files with 1616 additions and 4012 deletions

21
tests/test_theme.py Normal file
View file

@ -0,0 +1,21 @@
import pytest
from PySide6.QtGui import QPalette
from bouquin.theme import Theme, ThemeConfig, ThemeManager
def test_theme_manager_apply_light_and_dark(app):
cfg = ThemeConfig(theme=Theme.LIGHT)
mgr = ThemeManager(app, cfg)
mgr.apply(Theme.LIGHT)
assert isinstance(app.palette(), QPalette)
mgr.set(Theme.DARK)
assert isinstance(app.palette(), QPalette)
@pytest.mark.gui
def test_theme_manager_system_roundtrip(app, qtbot):
cfg = ThemeConfig(theme=Theme.SYSTEM)
mgr = ThemeManager(app, cfg)
mgr.apply(cfg.theme)