Add a toggle for the compact menu style#5777
Conversation
|
Preview available at https://egui-pr-preview.github.io/pr/5777-compact-menu-style-toggle |
lucasmerlin
left a comment
There was a problem hiding this comment.
I think this makes sense, but I think it would be even better if users could globally customize the menu style to their liking. That would mean Style would have to hold a StyleModifier, is that weird? @emilk what do you think?
I think performance wise it would be fine, since StyleModifier is an Arc
Sure, we could also make it more customizable. If |
<!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> Menus currently have their own style that removes outlines and backgrounds. This is nice if the menu only contains buttons. However if the menu contains other widgets, e.g. a drag value, the style change makes it quite difficult to identify such widgets. This is a simple way to make this configurable. * [x] I have followed the instructions in the PR template
Menus currently have their own style that removes outlines and backgrounds. This is nice if the menu only contains buttons. However if the menu contains other widgets, e.g. a drag value, the style change makes it quite difficult to identify such widgets. This is a simple way to make this configurable.