Skip to content

Respect OS "reduce motion" setting for Avalonia UI animations#4904

Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
respect-os-reduce-motion
Jun 9, 2026
Merged

Respect OS "reduce motion" setting for Avalonia UI animations#4904
Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
respect-os-reduce-motion

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request adds support for honoring the operating system's "reduce motion" accessibility preference throughout the application's UI transitions. When the user enables "reduce motion" in their OS settings, page transitions and certain animations are disabled or simplified for improved accessibility. The main changes include the implementation of a cross-platform MotionPreference utility and updates to transition and animation logic to respect this preference.

Accessibility: Reduce Motion Preference

  • Added a new MotionPreference utility class that detects the OS-level "reduce motion" or "show animations" accessibility setting on Windows, macOS, and Linux, using platform-specific APIs and commands. The result is cached on Unix systems for efficiency.

Page Transitions and Animations

  • Updated DirectionalSlideTransition to skip slide animations and instantly swap pages if "reduce motion" is enabled.
  • Updated EntrancePageTransition to bypass fade/slide animations and instantly transition between pages when "reduce motion" is active.
  • Modified PackageDetailsWindow to disable the screenshot carousel slide animation if the "reduce motion" preference is set.

@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit f635154 into main Jun 9, 2026
3 of 4 checks passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the respect-os-reduce-motion branch June 9, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants