mirror of
https://github.com/atom/atom.git
synced 2026-01-26 15:28:27 -05:00
call setSheetOffset on onDidChangeActiveThemes
This commit is contained in:
@@ -46,9 +46,6 @@ class AtomWindow
|
||||
@browserWindow = new BrowserWindow options
|
||||
global.atomApplication.addWindow(this)
|
||||
|
||||
if @applyTitleBarSetting()
|
||||
@browserWindow.setSheetOffset(23)
|
||||
|
||||
@handleEvents()
|
||||
|
||||
loadSettings = Object.assign({}, settings)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user