mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
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:
@@ -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()}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user