8080#define FUOPT_BGCOLOR_HLGROUP 0x004
8181
8282
83- #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
84- # define TABBAR_STYLE_UNIFIED @" Yosemite"
85- # define TABBAR_STYLE_METAL @" Yosemite"
86- #else
87- # define TABBAR_STYLE_UNIFIED @" Unified"
88- # define TABBAR_STYLE_METAL @" Metal"
89- #endif
90-
91-
9283@interface MMWindowController (Private)
9384- (NSSize )contentSize ;
9485- (void )resizeWindowToFitContentSize : (NSSize )contentSize
@@ -106,6 +97,8 @@ - (BOOL)maximizeWindow:(int)options;
10697- (void )applicationDidChangeScreenParameters : (NSNotification *)notification ;
10798- (void )enterNativeFullScreen ;
10899- (void )processAfterWindowPresentedQueue ;
100+ + (NSString *)tabBarStyleForUnified ;
101+ + (NSString *)tabBarStyleForMetal ;
109102@end
110103
111104
@@ -1187,7 +1180,8 @@ - (void)window:(NSWindow *)window
11871180 [[window animator ] setAlphaValue: 0 ];
11881181 } completionHandler: ^{
11891182 [window setStyleMask: ([window styleMask ] | NSFullScreenWindowMask )];
1190- [[vimView tabBarControl ] setStyleNamed: TABBAR_STYLE_UNIFIED];
1183+ NSString *tabBarStyle = [[self class ] tabBarStyleForUnified ];
1184+ [[vimView tabBarControl ] setStyleNamed: tabBarStyle];
11911185 [self updateTablineSeparator ];
11921186
11931187 // Stay dark for some time to wait for things to sync, then do the full screen operation
@@ -1251,7 +1245,8 @@ - (void)windowDidFailToEnterFullScreen:(NSWindow *)window
12511245 fullScreenEnabled = NO ;
12521246 [window setAlphaValue: 1 ];
12531247 [window setStyleMask: ([window styleMask ] & ~NSFullScreenWindowMask )];
1254- [[vimView tabBarControl ] setStyleNamed: TABBAR_STYLE_METAL];
1248+ NSString *tabBarStyle = [[self class ] tabBarStyleForMetal ];
1249+ [[vimView tabBarControl ] setStyleNamed: tabBarStyle];
12551250 [self updateTablineSeparator ];
12561251 [window setFrame: preFullScreenFrame display: YES ];
12571252}
@@ -1281,7 +1276,8 @@ - (void)window:(NSWindow *)window
12811276 [[window animator ] setAlphaValue: 0 ];
12821277 } completionHandler: ^{
12831278 [window setStyleMask: ([window styleMask ] & ~NSFullScreenWindowMask )];
1284- [[vimView tabBarControl ] setStyleNamed: TABBAR_STYLE_METAL];
1279+ NSString *tabBarStyle = [[self class ] tabBarStyleForMetal ];
1280+ [[vimView tabBarControl ] setStyleNamed: tabBarStyle];
12851281 [self updateTablineSeparator ];
12861282 [window setFrame: preFullScreenFrame display: YES ];
12871283
@@ -1328,7 +1324,8 @@ - (void)windowDidFailToExitFullScreen:(NSWindow *)window
13281324 fullScreenEnabled = YES ;
13291325 [window setAlphaValue: 1 ];
13301326 [window setStyleMask: ([window styleMask ] | NSFullScreenWindowMask )];
1331- [[vimView tabBarControl ] setStyleNamed: TABBAR_STYLE_UNIFIED];
1327+ NSString *tabBarStyle = [[self class ] tabBarStyleForUnified ];
1328+ [[vimView tabBarControl ] setStyleNamed: tabBarStyle];
13321329 [self updateTablineSeparator ];
13331330 [self maximizeWindow: fullScreenOptions];
13341331}
@@ -1691,5 +1688,16 @@ - (void)processAfterWindowPresentedQueue
16911688
16921689 [afterWindowPresentedQueue release ]; afterWindowPresentedQueue = nil ;
16931690}
1691+
1692+ + (NSString *)tabBarStyleForUnified
1693+ {
1694+ return shouldUseYosemiteTabBarStyle () ? @" Yosemite" : @" Unified" ;
1695+ }
1696+
1697+ + (NSString *)tabBarStyleForMetal
1698+ {
1699+ return shouldUseYosemiteTabBarStyle () ? @" Yosemite" : @" Metal" ;
1700+ }
1701+
16941702@end // MMWindowController (Private)
16951703
0 commit comments