diff --git a/main.py b/main.py index 964db50..0163e3f 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ import qdarktheme as qdt, sys, json, platform, logging import utils, darkdetect +from time import sleep from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import QObject, QThread, pyqtSignal from core.musicPlayer import MusicPlayer @@ -41,6 +42,7 @@ def run(self): if new_theme != self.current_theme: self.current_theme = new_theme self.on_theme_change(new_theme) + sleep(5) def on_theme_change(self, theme): logging.info(f"Detected theme change: {theme}") diff --git a/utils/__init__.py b/utils/__init__.py index 4f726c4..a566655 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -4,6 +4,7 @@ import ctypes import ctypes.wintypes import darkdetect +from time import sleep from winreg import HKEY_CURRENT_USER, QueryValueEx, OpenKey advapi32 = ctypes.windll.advapi32 @@ -148,4 +149,5 @@ def listener(callback): light_alt = lighten_color(accent, colorValues['light_alt']) # Call the callback with the system theme and colors - callback(accent, dark, dark_alt, light, light_alt) \ No newline at end of file + callback(accent, dark, dark_alt, light, light_alt) + sleep(5) \ No newline at end of file