fixed HUD recycling issue with popups

This commit is contained in:
daboe01 committed 2026-01-18 19:48:40 +01:00
1 parent c0c5325d8a
commit 60e01cdb33
1 file changed
+3 -1
+3 -1
View File
@@ -62,6 +62,9 @@ _CPMenuWindowAttachedMenuBackgroundStyle = 2;
// Do this so that coordinates will be accurate.
[menuWindow setFrameOrigin:CGPointMakeZero()];
// we need to reset the HUD state as this may be a recycled instance with HUD rund on non-HUD
[[menuWindow _windowView] unsetThemeState:CPThemeStateHUD];
[[menuWindow _menuView] unsetThemeState:CPThemeStateHUD];
}
else
menuWindow = [[_CPMenuWindow alloc] init];
@@ -174,7 +177,6 @@ _CPMenuWindowAttachedMenuBackgroundStyle = 2;
{
var color = [_menuView currentValueForThemeAttribute:@"menu-window-pop-up-background-style-color"];
// Fallback to standard logic if not HUD or if attribute wasn't found
if (!color)
color = [[self class] backgroundColorForBackgroundStyle:aBackgroundStyle];