Fix window title bar color on El Capitan

This commit is contained in:
1024jp 2016-01-05 12:57:13 +09:00
parent 99a73ba722
commit c75da68b05
2 changed files with 17 additions and 0 deletions

View File

@ -5,6 +5,15 @@ Change Log
develop
--------------------------
### Fixes
- FIx an issue where window title bar was dyed in the editor's background color on El Capitan.
2.3.3 (91)
--------------------------
### New Features
- Add “Share” menu to File menu.

View File

@ -56,6 +56,14 @@ NSString *_Nonnull const CEWindowOpacityDidChangeNotification = @"CEWindowOpacit
if (self) {
_backgroundAlpha = 1.0;
// make sure window title bar (incl. toolbar) is opaque
// -> It's actucally a bit dirty way but practically works well.
// Without this tweak, the title bar will be dyed in the background color on El Capitan. (2016-01 by 1024p)
if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_10) {
NSView *windowTitleView = [[self standardWindowButton:NSWindowCloseButton] superview];
[[windowTitleView layer] setBackgroundColor:[[NSColor windowBackgroundColor] CGColor]];
}
// observe toggling fullscreen
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(willEnterOpaqueMode:)