akvelon / flutter-code-editor

Flutter Code Editor is a multi-platform code editor supporting syntax highlighting, code blocks folding, autocompletion, read-only code blocks, hiding specific code blocks, themes, and more.

Home Page:https://akvelon.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit the variability of TextStyle in the gutter

alexeyinkin opened this issue · comments

For the line numbers to be aligned with the code lines, they should share a lot of properties in TextStyle. This is because we use the natural vertical flow in the text field and in the gutter. We made two separate TextStyles for that to allow flexibility with color, weight, and other things, but the users repeatedly put different fonts, sizes, line spacing, etc. and expect the two to be aligned.

See:

We should:

  1. Inspect each property in TextStyle and see if different values in it break the alignment.
  2. For those properties breaking the alignment, take their values from CodeField.textStyle and force them in GutterStyle.textStyle.
  3. Document which properties in GutterStyle.textStyle have effect and are not overridden.