From 5b19204eaba1d20a2ea1b979110885f8f79f53ff Mon Sep 17 00:00:00 2001 From: zarzet <42882290+zarzet@users.noreply.github.com> Date: Tue, 17 Nov 2026 12:40:08 +0700 Subject: [PATCH] fix(desktop): cross-fade inspector panels on the style's effects spring Switching between Lyrics and Up Next in the inspector cross-faded on a fixed linear 180 ms in both styles. It now uses the effects spring of the style; reduced motion still cuts. --- lib/widgets/desktop/desktop_inspector.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/widgets/desktop/desktop_inspector.dart b/lib/widgets/desktop/desktop_inspector.dart index fe3aa64dc..bc6923f79 100644 --- a/lib/widgets/desktop/desktop_inspector.dart +++ b/lib/widgets/desktop/desktop_inspector.dart @@ -414,10 +414,16 @@ class _DesktopInspectorTransitionState extends State Widget build(BuildContext context) { final shown = _shown; if (shown == null) return const SizedBox.shrink(); + // Switching panels cross-fades on the effects spring of the style. + final crossFade = AppMotion.effects( + context, + const AppMotionSpec(Duration.zero, Curves.linear), + mornye: MornyeMotion.effects, + ); final content = AnimatedSwitcher( - duration: MediaQuery.disableAnimationsOf(context) - ? Duration.zero - : const Duration(milliseconds: 180), + duration: crossFade.duration, + switchInCurve: crossFade.curve, + switchOutCurve: crossFade.curve, // Panels keep their fixed width while they cross-fade. layoutBuilder: (current, previous) => Stack( alignment: AlignmentDirectional.topStart,