call setSheetOffset on onDidChangeActiveThemes

This commit is contained in:
Philipp Brumm
2016-07-13 14:59:37 +02:00
parent 08a358228b
commit 76357473ad
2 changed files with 6 additions and 6 deletions

View File

@@ -46,9 +46,6 @@ class AtomWindow
@browserWindow = new BrowserWindow options
global.atomApplication.addWindow(this)
if @applyTitleBarSetting()
@browserWindow.setSheetOffset(23)
@handleEvents()
loadSettings = Object.assign({}, settings)

View File

@@ -1,7 +1,7 @@
module.exports =
class TitleBarElement extends HTMLElement
initialize: (@model, {@views, @workspace, @project, @config, @styles}) ->
initialize: (@model, {@workspace, @themes, @applicationDelegate}) ->
@classList.add('title-bar')
@@ -11,12 +11,15 @@ class TitleBarElement extends HTMLElement
@appendChild @titleElement
@workspace.onDidChangeActivePaneItem => @updateTitle()
@themes.onDidChangeActiveThemes => @setSheetOffset()
@updateTitle()
return this
updateTitle: =>
setSheetOffset: ->
@applicationDelegate.getCurrentWindow().setSheetOffset(@offsetHeight)
updateTitle: ->
@titleElement.textContent = document.title
module.exports = TitleBarElement = document.registerElement 'atom-title-bar', prototype: TitleBarElement.prototype