-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add basic dimming functionality #2751
Conversation
I guess this is a nice to have, but a config for it seems overkill, especially the kind of dimming functions to use. If this does get merged, we would also want to avoid pulling in a dependency ( It does feel like a good usability improvement after trying it out though, so I'm more or less on the fence now 😛 |
If I'm reading the |
thanks @CptPotato and @sudormrfbin for the feedback. |
Doing dimming across an entire area after the fact seems a bit of a hack -- I'd rather calculate the dimming inside render_view, similar to how we treat active/unfocused views by passing a bool into that function. |
- option to dim colors of unfocused views - option to dim buffer background behind overlay components
Co-authored-by: yvt <[email protected]>
Co-authored-by: yvt <[email protected]>
@archseer You are right, the post processing is quite hacky. I wanted to keep the dimming out of the rendering functions if possible, as it introduces code complexity there for something that is a graphical gimmick, at best a slight UX improvement. With bb4fec7 i've tried another an implementation that does the dimming ad-hoc, with just slight adjustments to the main render loop and a little state in the drawing buffer. |
clsoing this one as stale. Almost the entire rendering code has been removed since so this would need to start over from scratch. Thank you for contributing! |
This adds a first iteration of color dimming to the editor.
You can:
The following dimming functions are implemented:
Config example:
[editor.dim]
SectionEnable dimming in certain areas. Disabled by default. Enable by assigning:
overlay-backdrops
None
unfocused-views
None
Screenshots:
Todo:
Looking for feedback.
Do we actually want this functionality in the tui?
Leave this to alternative frontends or plugins later?
Could this be used with #1187 ?