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:
+5
-2
@@ -181,8 +181,7 @@ AcrylicTheme GetLightAcrylicTheme()
|
|||||||
const AcrylicTheme& GetCurrentAcrylicTheme()
|
const AcrylicTheme& GetCurrentAcrylicTheme()
|
||||||
{
|
{
|
||||||
if (!s_acrylicThemeInitialized) {
|
if (!s_acrylicThemeInitialized) {
|
||||||
s_currentAcrylicTheme = GetDragonXAcrylicTheme();
|
SetCurrentAcrylicTheme(GetDragonXAcrylicTheme());
|
||||||
s_acrylicThemeInitialized = true;
|
|
||||||
}
|
}
|
||||||
return s_currentAcrylicTheme;
|
return s_currentAcrylicTheme;
|
||||||
}
|
}
|
||||||
@@ -190,6 +189,10 @@ const AcrylicTheme& GetCurrentAcrylicTheme()
|
|||||||
void SetCurrentAcrylicTheme(const AcrylicTheme& theme)
|
void SetCurrentAcrylicTheme(const AcrylicTheme& theme)
|
||||||
{
|
{
|
||||||
s_currentAcrylicTheme = 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;
|
s_acrylicThemeInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user