-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support bg color in code blocks #223
base: main
Are you sure you want to change the base?
feat: support bg color in code blocks #223
Conversation
I'm too busy with work to take a look today/tomorrow, but I should have time to try and get things working this weekend The renderer is pretty foreign to me too, so I don't have much guidance without digging in myself unfortunately 😅 |
No problem at all! Review when you have time and motivation 🙂. In the meantime I'll still try to get this working. |
So, this is the area where the background of the entire codeblock gets drawn, so it'll also be where the background color for the individual lines get drawn as well I also think the default background color and style changes can be dropped in Feel free to ask questions if things are still unclear. I'd also be happy to take a stab at getting things working if you get stuck |
4c46a04
to
e089856
Compare
Thanks for all your work on this! I should have some time to look over things either today or tomorrow |
Sorry for the delay. I'm on vacation, so I probably won't have much time to look into this for the next week or so (Me thinking I would have enough spare time was a bit optimistic 😅) |
Hey, no problem, have a great vacation! I'm still working on this when I have time (essentially week-ends). I think I need to refactor some of the code around though to make this specific change easier (to do and review). |
In order to fix #211, I've tried adding support for background colors.
I just can't get the final
Text
render to work because I'm not sure where it is.I think if
Attr
hadbg_color
or similar here that could work. But that's acosmic_text
struct andcosmic_text
doesn't mention background anywhere in their doc.So I'm kind of lost here, I tried looking at how
TextBox
renders its background but couldn't find it either.PS. I'll check if the tests changes are valid once I can get this to work.