mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Sample font styling when font config values change
We previously could do it whenever stylesheets changed, but these values end up getting assigned to the global stylesheet for cascading reasons and we’re only watching the local stylesheet. We poll the host elements DOM properties, but forcing a sync poll when the config values change makes behavior synchronous for specs and more responsive when changing these values.
This commit is contained in:
@@ -416,6 +416,9 @@ TextEditorComponent = React.createClass
|
||||
|
||||
observeConfig: ->
|
||||
@subscribe atom.config.observe 'editor.useHardwareAcceleration', @setUseHardwareAcceleration
|
||||
@subscribe atom.config.onDidChange 'editor.fontSize', @sampleFontStyling
|
||||
@subscribe atom.config.onDidChange 'editor.fontFamily', @sampleFontStyling
|
||||
@subscribe atom.config.onDidChange 'editor.lineHeight', @sampleFontStyling
|
||||
|
||||
onGrammarChanged: ->
|
||||
{editor} = @props
|
||||
|
||||
Reference in New Issue
Block a user