diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 57ffceebf..b04a3e05a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -105,6 +105,7 @@ dobefore <1432338032@qq.com> Bart Louwers Sam Penny Yutsuten +Zoom ******************** diff --git a/qt/aqt/theme.py b/qt/aqt/theme.py index c4393be01..63b3318b3 100644 --- a/qt/aqt/theme.py +++ b/qt/aqt/theme.py @@ -297,11 +297,11 @@ def get_windows_dark_mode() -> bool: QueryValueEx, ) - key = OpenKey( - HKEY_CURRENT_USER, - r"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", - ) try: + key = OpenKey( + HKEY_CURRENT_USER, + r"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", + ) return not QueryValueEx(key, "AppsUseLightTheme")[0] except Exception as err: # key reportedly missing or set to wrong type on some systems