diff --git a/HellionChat/Themes/ThemeRegistry.cs b/HellionChat/Themes/ThemeRegistry.cs index f8cb3f2..8f063bd 100644 --- a/HellionChat/Themes/ThemeRegistry.cs +++ b/HellionChat/Themes/ThemeRegistry.cs @@ -522,7 +522,10 @@ public sealed class ThemeRegistry ) { var t = (float)(now - _crossfadeStartTickMs) / CrossfadeDurationMs; - snapshot = ThemeAbgrCacheLerp.Lerp(_previousAbgrSnapshot.Value, _active.AbgrCache, t); + // A2: SmoothStep easing so the fade eases in/out instead of a + // linear ramp. MUST stay in lockstep with TryGetActiveCrossfade (K8). + var te = t * t * (3f - 2f * t); + snapshot = ThemeAbgrCacheLerp.Lerp(_previousAbgrSnapshot.Value, _active.AbgrCache, te); } else { @@ -548,7 +551,9 @@ public sealed class ThemeRegistry return false; var t = (float)elapsed / CrossfadeDurationMs; - lerped = ThemeAbgrCacheLerp.Lerp(_previousAbgrSnapshot.Value, _active.AbgrCache, t); + // A2: SmoothStep easing -- keep identical to ArmCrossfade (K8). + var te = t * t * (3f - 2f * t); + lerped = ThemeAbgrCacheLerp.Lerp(_previousAbgrSnapshot.Value, _active.AbgrCache, te); return true; } diff --git a/HellionChat/Ui/StyleEngine/DrawListExtensions.cs b/HellionChat/Ui/StyleEngine/DrawListExtensions.cs index 7fd1590..b19a7bb 100644 --- a/HellionChat/Ui/StyleEngine/DrawListExtensions.cs +++ b/HellionChat/Ui/StyleEngine/DrawListExtensions.cs @@ -22,6 +22,9 @@ internal static class DrawListExtensions // highlight, not a saturated accent flash (effect level "subtle"). private const float SheenTintStrength = 0.35f; + // A2 tuning knob: peak alpha at t=0, fading linearly to 0 over the sweep. + private const byte SheenPeakAlpha = 0x40; + private static readonly Dictionary SheenStarts = new(); // Test-observability hook for HoverSheenAllocStep: lets the self-test @@ -57,7 +60,7 @@ internal static class DrawListExtensions return; var t = (float)(elapsed / SheenDurationSeconds); - var alpha = (byte)Math.Round(0x40 * (1f - t)); + var alpha = (byte)Math.Round(SheenPeakAlpha * (1f - t)); // Tint the sweep toward the accent hue, then stamp the falloff alpha. // accentRgba is RGBA; convert to ABGR FIRST or the draw-list swaps R/B. var accentAbgr = ColourUtil.RgbaToAbgr(accentRgba);