-
Notifications
You must be signed in to change notification settings - Fork 498
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: draw block characters with background opacity #2478
feat: draw block characters with background opacity #2478
Conversation
865f494
to
e20b245
Compare
Thank you! I think this is good for a quick workaround before we have a long-term proper solution like this or an alternative: But it could also cause problems for other UI elements, there might be some UI element that is supposed to be opaque, like a border, which now becomes transparent with these changes. So, it's a two-edged sword. But in any case, would you mind, rebasing on top of main, so that we get proper CI checks for this? After that I will discuss this with the other maintainers and decide what to do. |
e20b245
to
1d66107
Compare
Some of the clippy warnings will be fixed by: But the
As a sidenote, we need to improve the reporting of the clippy warnings: |
1d66107
to
3914c53
Compare
3914c53
to
cfc9b09
Compare
Sorry about that, forgot to include |
This looks great! Thanks for the fix. @fredizzimo this is a small enough change that I'm merging it for now and we can revert it if and when the longer term fix gets implemented. In the meantime, I will do some testing to see how rough the issues you mentioned might be |
- remove the `is_box_drawing_character` function and its usage - refactor the paint blending logic in the `gridrenderer` struct
@Theaninova first of all, thank you for the contribution! I had to revert this change in specific due to some issues to render the floating window borders. I'll share an example where the border disappear at top and the bottom: and this one it's how it should be rendered: I would be happy to help you with any further information to bring the fix. |
I was debating in my head if it would be reasonable to include the box drawing set
In hindsight, that was probably a bad idea (who could have guessed). Removing that range should do the trick. I also just realized that I messed up the ranges when fixing the clippy warnings, all of them should be inclusive fn is_box_drawing_character(c: char) -> bool {
// block elements
('\u{2580}'..='\u{259F}').contains(&c)
// geometric shapes
|| ('\u{25A0}'..='\u{25FF}').contains(&c)
// nerdfont powerline
|| ('\u{e0a0}'..='\u{e0a2}').contains(&c)
|| ('\u{e0b0}'..='\u{e0b3}').contains(&c)
// nerdfont powerline extras
|| (c == '\u{e0a3}')
|| ('\u{e0b4}'..='\u{e0c8}').contains(&c)
|| (c == '\u{e0ca}')
|| ('\u{e0cc}'..='\u{e0d7}').contains(&c)
} |
This work is pretty related to #2491 which was opened just recently. |
What kind of change does this PR introduce?
This fixes #2275 by letting box drawing, block elements, geometric shapes as well as the Nerdfont Powerline (+Extras) inherit the background opacity instead.
Did this PR introduce a breaking change?
A breaking change includes anything that breaks backwards compatibility either at compile or run time.