Various tweaks to theme, more code coverage

This commit is contained in:
Miguel Jacq 2025-11-06 11:47:00 +11:00
parent c3b83b0238
commit 7c3ec19748
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
17 changed files with 812 additions and 49 deletions

View file

@ -0,0 +1,19 @@
from PySide6.QtWidgets import QApplication
from PySide6.QtGui import QPalette, QColor
from bouquin.theme import ThemeManager, ThemeConfig, Theme
def test_theme_manager_applies_palettes(qtbot):
app = QApplication.instance()
tm = ThemeManager(app, ThemeConfig())
# Light palette should set Link to the light blue
tm.apply(Theme.LIGHT)
pal = app.palette()
assert pal.color(QPalette.Link) == QColor("#1a73e8")
# Dark palette should set Link to lavender-ish
tm.apply(Theme.DARK)
pal = app.palette()
assert pal.color(QPalette.Link) == QColor("#FFA500")