Add custom-inset title-bar

This commit is contained in:
simurai
2017-01-14 16:06:50 +09:00
parent c406cc4420
commit 6010c4d7df
4 changed files with 67 additions and 54 deletions

View File

@@ -46,9 +46,12 @@ class AtomWindow
if @shouldAddCustomTitleBar()
options.titleBarStyle = 'hidden'
if @shouldHideTitleBar()
if @shouldAddCustomInsetTitleBar()
options.titleBarStyle = 'hidden-inset'
if @shouldHideTitleBar()
options.frame = false
@browserWindow = new BrowserWindow options
@atomApplication.addWindow(this)
@@ -234,6 +237,11 @@ class AtomWindow
process.platform is 'darwin' and
@atomApplication.config.get('core.titleBar') is 'custom'
shouldAddCustomInsetTitleBar: ->
not @isSpec and
process.platform is 'darwin' and
@atomApplication.config.get('core.titleBar') is 'custom-inset'
shouldHideTitleBar: ->
not @isSpec and
process.platform is 'darwin' and