-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Allow viewer co customize egui style for the individual node UI #52
Conversation
Would it be possible to pass less than whole |
Passing the whole UI is done precisely to avoid allocation. The default implementation of the method does nothing with the UI and doesn't allocate anything, but the downstream implementation may use this method to call An example in my app: https://github.com/juh9870/dbe/blob/382411ab25a7b676312c3e6613eeab74a786a5e3/dbe_ui/src/workspace/graph.rs#L104-L117 I use an external crate to modify the style of the passed UI. |
I would like to avoid giving |
You can also go the |
I don't like it, but it would be consistent with the rest of the API. |
05bc5be
to
da2c390
Compare
Done to be consistent with the existing has_body and has_footer, and to remove the exposure of ui in the style method, while still keeping unnecessary allocations away.
da2c390
to
59a3427
Compare
Sorry for force pushes. Changed to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last detail to change if you don't mind
Done to be consistent with other methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
This would allow the viewer to tweak ui style of all node elements, instead of tweaking each one individually.
In my app, I use this to lock the node to light or dark mode, or edit their full style