fix(theme): give the menu acrylic the card blur radius

Every panel class samples one shared blur texture, so a menu asking for
a different blur radius than cards could not actually get it. All it did
was force a second full-screen blur pass each frame as the radius
flipped between the card and menu values, and let whichever class drew
last decide the radius for everything.

- Setting the acrylic theme now copies the card blur radius onto the
  menu class, so menus and cards share one radius and the blur runs
  once per frame. The first-use default path goes through the same
  setter so it is covered too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 13:30:20 -05:00
co-authored by Claude Opus 4.8
parent cd83038de5
commit 75e0c5048e
+5 -2
View File
@@ -181,8 +181,7 @@ AcrylicTheme GetLightAcrylicTheme()
const AcrylicTheme& GetCurrentAcrylicTheme()
{
if (!s_acrylicThemeInitialized) {
s_currentAcrylicTheme = GetDragonXAcrylicTheme();
s_acrylicThemeInitialized = true;
SetCurrentAcrylicTheme(GetDragonXAcrylicTheme());
}
return s_currentAcrylicTheme;
}
@@ -190,6 +189,10 @@ const AcrylicTheme& GetCurrentAcrylicTheme()
void SetCurrentAcrylicTheme(const AcrylicTheme& theme)
{
s_currentAcrylicTheme = theme;
// Every panel class samples ONE shared blur texture, so a per-class radius cannot be honoured
// anyway: it only makes applyBlur() re-blur twice per frame (card <-> menu) and lets the last
// radius drawn win for all cards. Menus use the card radius.
s_currentAcrylicTheme.menu.blurRadius = s_currentAcrylicTheme.card.blurRadius;
s_acrylicThemeInitialized = true;
}