Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Explicitally set "setTitlebarAppearsTransparent" #11164

Merged
merged 2 commits into from Nov 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions atom/browser/native_window_mac.mm
Expand Up @@ -337,7 +337,7 @@ - (void)windowDidEndLiveResize:(NSNotification*)notification {
}

- (void)windowWillEnterFullScreen:(NSNotification*)notification {
// Setting resizable to true before entering fullscreen
// Setting resizable to true before entering fullscreen
is_resizable_ = shell_->IsResizable();
shell_->SetResizable(true);
// Hide the native toolbar before entering fullscreen, so there is no visual
Expand Down Expand Up @@ -962,10 +962,16 @@ static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
// 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];
Expand Down