Skip to content

Add option to make explain cycle through colors of the rainbow (+ fix layering) #2913

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

watsaig
Copy link

@watsaig watsaig commented Apr 29, 2025

Small quality-of-life change to give users the option to use either a single color for explain, or to have it cycle through colors. Colors change at each level of the hierarchy, so it's easier to see what elements are part of what other elements, and to tell the difference between overlapping elements.
See the layout example:

layout example

I'm very unsure about what to name things and what to re-export where, but hopefully this is close to useable.

The change is non-breaking, since explain now takes Into<ExplainColor> which has a blanket impl From<C: Into<Color>> (so we can just pass a Color, same as before).

watsaig and others added 2 commits April 29, 2025 08:37
If the child widget has multiple layers (e.g. `Stack`), the layout explanation
would be partially hidden by the layers of the child widget. Just put the layout
explanation in its own layer to mitigate this.
@watsaig watsaig changed the title Add option to make explain cycle through colors of the rainbow Add option to make explain cycle through colors of the rainbow (+ fix layering) Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants