mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add option to hide the title bar
This commit is contained in:
@@ -83,7 +83,7 @@ class AtomApplication
|
||||
initialize: (options) ->
|
||||
global.atomApplication = this
|
||||
|
||||
@config.onDidChange 'core.useCustomTitleBar', @promptForRestart
|
||||
@config.onDidChange 'core.titleBar', @promptForRestart
|
||||
|
||||
@autoUpdateManager = new AutoUpdateManager(@version, options.test, @resourcePath, @config)
|
||||
@applicationMenu = new ApplicationMenu(@version, @autoUpdateManager)
|
||||
|
||||
@@ -43,6 +43,9 @@ class AtomWindow
|
||||
if process.platform is 'linux'
|
||||
options.icon = @constructor.iconPath
|
||||
|
||||
if @shouldAddCustomTitleBar()
|
||||
options.titleBarStyle = 'hidden'
|
||||
|
||||
if @shouldHideTitleBar()
|
||||
options.titleBarStyle = 'hidden-inset'
|
||||
|
||||
@@ -227,10 +230,15 @@ class AtomWindow
|
||||
[width, height] = @browserWindow.getSize()
|
||||
{x, y, width, height}
|
||||
|
||||
shouldAddCustomTitleBar: ->
|
||||
not @isSpec and
|
||||
process.platform is 'darwin' and
|
||||
@atomApplication.config.get('core.titleBar') is 'custom'
|
||||
|
||||
shouldHideTitleBar: ->
|
||||
not @isSpec and
|
||||
process.platform is 'darwin' and
|
||||
@atomApplication.config.get('core.useCustomTitleBar')
|
||||
@atomApplication.config.get('core.titleBar') is 'hidden'
|
||||
|
||||
close: -> @browserWindow.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user