feat(ui): wire ThemeRegistry crossfade into PushGlobal

Switch picks a lerped AbgrCache during the 300ms crossfade window
(ReduceMotion bypass keeps the snap path). Plugin-load init path
switches to SwitchSilent so opening the plugin no longer fades from
the default theme. WindowBg/ChildBg RGBA path stays bound to the
user's per-window opacity override and never fades.

PushGlobal takes the ThemeRegistry as a parameter -- it is an instance
member on Plugin, not static, so the single Plugin.Draw call-site
threads it through alongside the active theme.
This commit is contained in:
2026-05-20 10:36:33 +02:00
parent 74b07519f5
commit a35067f80a
3 changed files with 27 additions and 3 deletions
@@ -19,7 +19,7 @@ internal sealed class ThemeRegistryInitHostedService(ThemeRegistry registry) : I
// warm cache; otherwise the first Switch falls through to the built-in
// default when Config.Theme points at a custom slug.
foreach (var _ in registry.AllCustom()) { }
registry.Switch(Plugin.Config.Theme);
registry.SwitchSilent(Plugin.Config.Theme);
return Task.CompletedTask;
}