Standard widgets: Popover and Menu.#21636
Conversation
| observe(on_menu_event), | ||
| children![( | ||
| Node { | ||
| width: Val::Px(200.0), |
There was a problem hiding this comment.
Given this is an example, where I expect to see idiomatic code, shouldn't the convenience functions (px, percent, px(n).all()) be used here and not Val directly?
There was a problem hiding this comment.
Replaced uses of Val.
|
The way this component is named |
"Select" is a different widget:
Both are in the class of "popups" and "dropdowns". You can easily build a select from a menu:
|
isHavvy
left a comment
There was a problem hiding this comment.
(Approving only for my nit, not the whole thing)
ickshonpe
left a comment
There was a problem hiding this comment.
I've only had a quick look, but I don't see any obvious problems with the implementation, and the menu in the example works nicely.
| ) | ||
| ), | ||
| menu_button(asset_server), | ||
| Text::new("Press 'D' to toggle widget disabled states"), |
There was a problem hiding this comment.
Pressing "D" doesn't disable the menu, don't know if that's intended or not.
There was a problem hiding this comment.
I added code to disable the button, although I didn't add code to change the menu button color when disabled, but you can see that when disabled the menu does not pop up.
|
Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke! If it's expected, please add the M-Deliberate-Rendering-Change label. If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it. |
|
Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke! If it's expected, please add the M-Deliberate-Rendering-Change label. If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it. |
|
Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke! If it's expected, please add the M-Deliberate-Rendering-Change label. If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it. |
Co-authored-by: Viktor Gustavsson <villor94@gmail.com>
Objective
Solution
Testing
Showcase