WCAG: Add reduce_motion config, bridge property, OS detection

Config default, reduceMotion Q_PROPERTY on UIBridge, Windows
SystemParametersInfo detection for prefers-reduced-motion.
This commit is contained in:
Your Name
2026-02-18 21:02:27 +02:00
parent d40c83cc45
commit a70e76b4ab
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)