configure preview image background color via theme.toml #552
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
benjajaja/ratatui-image#21
Due to ratatui's immediate-mode nature, the cells behind the image must be "skipped" so that nothing draws over the image. In other words, the cells behind the image still have whatever was drawn last time before they were marked skipped for the image. Thus, the image must always fill the cells/area, and the frame cannot be made transparent.
This PR makes the background color configurable via theme.toml. It could also be done via
joshuto.toml
, which is what I initially did, so I could revert to that. I am not sure which is better, the goal here is essentially to make previews look good in terminals with white background, but it actually also applies to any terminal theme background color that isn't pitch black.Closes #521