Merge pull request #11164 from electron/nstitlebar-hidden

fix: Explicitally set "setTitlebarAppearsTransparent"
This commit is contained in:
Charles Kerr 2017-11-21 07:51:47 +01:00 committed by GitHub
commit dba9181611
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -962,10 +962,16 @@ NativeWindowMac::NativeWindowMac(
// We will manage window's lifetime ourselves.
[window_ setReleasedWhenClosed:NO];
// Hide the title bar background
if (title_bar_style_ != NORMAL) {
if (base::mac::IsAtLeastOS10_10()) {
[window_ setTitlebarAppearsTransparent:YES];
}
}
// Hide the title bar.
if (title_bar_style_ == HIDDEN_INSET) {
if (base::mac::IsAtLeastOS10_10()) {
[window_ setTitlebarAppearsTransparent:YES];
base::scoped_nsobject<NSToolbar> toolbar(
[[NSToolbar alloc] initWithIdentifier:@"titlebarStylingToolbar"]);
[toolbar setShowsBaselineSeparator:NO];