CodeEditApp / CodeEditSourceEditor

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

Improved Line Number Appearance #71

Closed austincondiff closed 2 years ago

austincondiff commented 2 years ago

This PR improves the overall appearance of the line numbers in the gutter of the editor.

Related Issue

Before

image

Target

image

After

image

It is not perfect though, it needs decreased tracking and narrower character width. This is the code I have added to produce this:

rulerView.font = NSFont.monospacedDigitSystemFont(ofSize: 9.5, weight: .regular)

It also uses character variants here such as the open "4" (you'll see in the target it is open, and in my version it is closed).

If anyone knows of a way to improve this let me know, otherwise we can merge this for the time being until we find a better solution.