mirror of
https://github.com/atom/atom.git
synced 2026-01-26 23:38:48 -05:00
move title bar setting check into method and check for isSpec as well
This commit is contained in:
@@ -40,13 +40,13 @@ class AtomWindow
|
||||
if process.platform is 'linux'
|
||||
options.icon = @constructor.iconPath
|
||||
|
||||
if process.platform is 'darwin' and global.atomApplication.config.get('core.useCustomTitleBar')
|
||||
if @applyTitleBarSetting()
|
||||
options.titleBarStyle = 'hidden'
|
||||
|
||||
@browserWindow = new BrowserWindow options
|
||||
global.atomApplication.addWindow(this)
|
||||
|
||||
if process.platform is 'darwin' and global.atomApplication.config.get('core.useCustomTitleBar')
|
||||
if @applyTitleBarSetting()
|
||||
@browserWindow.setSheetOffset(23)
|
||||
|
||||
@handleEvents()
|
||||
@@ -205,6 +205,11 @@ class AtomWindow
|
||||
[width, height] = @browserWindow.getSize()
|
||||
{x, y, width, height}
|
||||
|
||||
applyTitleBarSetting: ->
|
||||
not @isSpec and
|
||||
process.platform is 'darwin' and
|
||||
global.atomApplication.config.get('core.useCustomTitleBar')
|
||||
|
||||
close: -> @browserWindow.close()
|
||||
|
||||
focus: -> @browserWindow.focus()
|
||||
|
||||
Reference in New Issue
Block a user