CodeEditApp / CodeEditSourceEditor

A code editor view written in Swift powered by tree-sitter.
https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
MIT License
504 stars 74 forks source link

Improved vertical line alignment #180

Closed austincondiff closed 1 year ago

austincondiff commented 1 year ago

Description

Currently the line is misaligned, this change makes line content centered aligned vertically.

Note: In order to fix this, I am adding 2 to the baseline offset. I cannot find why it is off by 2 in the first place. I'd like to not use a magic number, but unless another solution can be found, this will do for the time being. I played with font size and line height values and it remains centered, so it is truly off by 2.

Checklist

Screenshots

Before

image

After

image