Created
September 2, 2015 09:34
-
-
Save jaanus/69782e30aba65873d698 to your computer and use it in GitHub Desktop.
Electron on Mac - patch for titleless look
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jaanus@jaanus-imac ~/D/electron> git diff | |
diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm | |
index 64f7c11..922cf64 100644 | |
--- a/atom/browser/native_window_mac.mm | |
+++ b/atom/browser/native_window_mac.mm | |
@@ -352,7 +352,7 @@ NativeWindowMac::NativeWindowMac( | |
options.Get(switches::kStandardWindow, &useStandardWindow); | |
NSUInteger styleMask = NSTitledWindowMask | NSClosableWindowMask | | |
- NSMiniaturizableWindowMask | NSResizableWindowMask; | |
+ NSMiniaturizableWindowMask | NSResizableWindowMask | NSFullSizeContentViewWindowMask | NSUnifiedTitleAndToolbarWindowMask; | |
if (!useStandardWindow || transparent() || !has_frame()) { | |
styleMask |= NSTexturedBackgroundWindowMask; | |
} | |
@@ -382,6 +382,10 @@ NativeWindowMac::NativeWindowMac( | |
// We will manage window's lifetime ourselves. | |
[window_ setReleasedWhenClosed:NO]; | |
+ // Configure window look | |
+ [window_ setTitlebarAppearsTransparent:YES]; | |
+ [window_ setTitleVisibility:NSWindowTitleHidden]; | |
+ | |
// On OS X the initial window size doesn't include window frame. | |
bool use_content_size = false; | |
options.Get(switches::kUseContentSize, &use_content_size); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment