toolstack / Folio

A beautiful markdown note-taking app for GNOME (forked from Paper)
GNU General Public License v3.0
127 stars 12 forks source link

Block code background color #126

Open adtoolsdev opened 3 weeks ago

adtoolsdev commented 3 weeks ago

I typed

import pandas as pd

issue_toolstackfolio Apparently the code block does not change the background color after being added. Is it possible to implement this feature?

toolstack commented 3 weeks ago

Possible yes.

I had noticed it and thought it weird that inline code changed the background colour but code blocks didn't. Will make the change for the next release.

toolstack commented 3 weeks ago

I took a look and now know why it wasn't implemented before, it's more complex than it first appears.

Because the code block uses tags in the GTK SourceView widget, if you change the background colour, it only changes for the text as displayed, which means if you have a multi-line code block that isn't fully justified, you get a saw tooth effect at the end of the lines.

Will need to look into this some more and see if the background of the entire line can be changed easily.