Add reduce_motion config and OS detection

This commit is contained in:
2026-02-18 21:02:27 +02:00
parent 7135459a18
commit 727c2f2704
3 changed files with 32 additions and 1 deletions

15
main.py
View File

@@ -80,6 +80,21 @@ try:
except:
pass
# Detect Windows "Reduce Motion" preference
try:
import ctypes
SPI_GETCLIENTAREAANIMATION = 0x1042
animation_enabled = ctypes.c_bool(True)
ctypes.windll.user32.SystemParametersInfoW(
SPI_GETCLIENTAREAANIMATION, 0,
ctypes.byref(animation_enabled), 0
)
if not animation_enabled.value:
ConfigManager().data["reduce_motion"] = True
ConfigManager().save()
except Exception:
pass
# Configure Logging
class QmlLoggingHandler(logging.Handler, QObject):
sig_log = Signal(str)