diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j index c6046ad0b..6fa5c020d 100644 --- a/AppKit/CPApplication.j +++ b/AppKit/CPApplication.j @@ -1292,8 +1292,12 @@ var _CPAppBootstrapperActions = nil, + (void)blendDidFinishLoading:(CPThemeBlend)aThemeBlend { - [[CPApplication sharedApplication] setThemeBlend:aThemeBlend]; - [CPTheme setDefaultTheme:[CPTheme themeNamed:[CPApplication defaultThemeName]]]; + var themeBlends = [CPApp themeBlends]; + + [themeBlends addObject:aThemeBlend]; + + if ([themeBlends count] === 1) + [CPTheme setDefaultTheme:[CPTheme themeNamed:[CPApplication defaultThemeName]]]; if (_CPAppThemeURLsToLoad.length === 0) [self performActions]; diff --git a/AppKit/CPView.j b/AppKit/CPView.j index b620acf0f..8b35a90bf 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -2695,7 +2695,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", [self setupViewFlags]; - _theme = [CPTheme defaultTheme]; + _theme = [CPTheme themeForView:self]; _themeClass = [aCoder decodeObjectForKey:CPViewThemeClassKey]; _themeState = CPThemeState([aCoder decodeIntForKey:CPViewThemeStateKey]); _themeAttributes = {};