Give lines and line numbers an opaque background to support sub-pixel AA

Since lines and line numbers are now on the GPU, their text won't be
properly anti-aliased on low-resolution displays unless their layers
have a solid background.
This commit is contained in:
Nathan Sobo
2014-05-12 12:22:11 -06:00
parent a22480d857
commit 63488997ee
2 changed files with 2 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ LineNumberComponent = React.createClass
render: ->
{index, lineHeight, scrollOffset} = @props
div
className: "line-number"
className: "line-number editor-colors"
style: {WebkitTransform: "translate3d(0px, #{index * lineHeight + scrollOffset}px, 0px)"}
dangerouslySetInnerHTML: {__html: @buildInnerHTML()}

View File

@@ -112,7 +112,7 @@ LineComponent = React.createClass
left = horizontalScrollOffset
style = WebkitTransform: "translate3d(#{left}px, #{top}px, 0px)"
div className: 'line', style: style, 'data-screen-row': screenRow, dangerouslySetInnerHTML: {__html: @buildInnerHTML()}
div className: 'line editor-colors', style: style, 'data-screen-row': screenRow, dangerouslySetInnerHTML: {__html: @buildInnerHTML()}
buildInnerHTML: ->
if @props.tokenizedLine.text.length is 0