Move lock_overlay/calendar theming to the ThemeManager

This commit is contained in:
Miguel Jacq 2025-11-12 10:51:08 +11:00
parent 118e192639
commit 494b14136b
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
5 changed files with 154 additions and 157 deletions

View file

@ -2,15 +2,16 @@ import pytest
from PySide6.QtCore import QEvent
from PySide6.QtWidgets import QWidget
from bouquin.lock_overlay import LockOverlay
from bouquin.theme import ThemeManager, ThemeConfig, Theme
@pytest.mark.gui
def test_lock_overlay_reacts_to_theme(qtbot):
def test_lock_overlay_reacts_to_theme(app, qtbot):
host = QWidget()
qtbot.addWidget(host)
host.show()
ol = LockOverlay(host, on_unlock=lambda: None)
themes = ThemeManager(app, ThemeConfig(theme=Theme.LIGHT))
ol = LockOverlay(host, on_unlock=lambda: None, themes=themes)
qtbot.addWidget(ol)
ol.show()