parent
31604a0cd2
commit
39576ac7f3
54 changed files with 1616 additions and 4012 deletions
21
tests/test_theme.py
Normal file
21
tests/test_theme.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue