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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user