mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-11 01:18:45 +00:00
fixed HUD recycling issue with popups
This commit is contained in:
1 parent
c0c5325d8a
commit
60e01cdb33
1 file changed
+3
-1
@@ -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];
|
||||
|
||||
|
||||
Reference in new issue
Block a user