}
-@interface FramedBrowserWindow ()
+@interface FramedBrowserWindow (Private)
- (void)adjustCloseButton:(NSNotification*)notification;
- (void)adjustMiniaturizeButton:(NSNotification*)notification;
}
- (void)setShouldHideTitle:(BOOL)flag {
- if ([self respondsToSelector:@selector(setTitleVisibility:)])
- self.titleVisibility = flag ? NSWindowTitleHidden : NSWindowTitleVisible;
- else
- shouldHideTitle_ = flag;
+ shouldHideTitle_ = flag;
}
- (BOOL)_isTitleHidden {
- // Only intervene with 10.6-10.9.
- if ([self respondsToSelector:@selector(setTitleVisibility:)])
- return [super _isTitleHidden];
- else
- return shouldHideTitle_;
+ return shouldHideTitle_;
}
- (CGFloat)windowButtonsInterButtonSpacing {
bounds:windowRect
forceBlackBackground:NO];
- // In Yosemite: The title is drawn by a subview and not painted on. Therefore,
- // never worry about drawing it. Pre-Yosemite: If the window needs a title and
- // we painted over the title as drawn by the default window paint, paint it
- // ourselves.
- if (![self respondsToSelector:@selector(setTitleVisibility:)] &&
- themed && [view respondsToSelector:@selector(_titlebarTitleRect)] &&
+ // If the window needs a title and we painted over the title as drawn by the
+ // default window paint, paint it ourselves.
+ if (themed && [view respondsToSelector:@selector(_titlebarTitleRect)] &&
[view respondsToSelector:@selector(_drawTitleStringIn:withColor:)] &&
![self _isTitleHidden]) {
[view _drawTitleStringIn:[view _titlebarTitleRect]