You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple custom_menu_button are vertically aligned and close together, going in one button's menu auto-switch to the menu of the next one instead of letting me interact with the menu's content:
custom-menu-bug.mp4
Repro
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]// hide console window on Windows in release#![allow(rustdoc::missing_crate_level_docs)]// it's an exampleuse eframe::egui;fnmain() -> eframe::Result{
env_logger::init();// Log to stderr (if you run with `RUST_LOG=debug`).let options = eframe::NativeOptions{viewport: egui::ViewportBuilder::default().with_inner_size([320.0,240.0]),
..Default::default()};
eframe::run_simple_native("My egui App", options,move |ctx, _frame| {
egui::CentralPanel::default().show(ctx, |ui| {
egui::menu::menu_custom_button(ui, egui::Button::new("BTN"), |ui| {
ui.button("Hello world");});
egui::menu::menu_custom_button(ui, egui::Button::new("BTN"), |ui| {
ui.button("Hello world");});});})}
Step:
click on the top button
attempt to click on the "hello world" button in the menu
Expected: the menu stays open so I can interact with its content
Actual: the menu of the next button shows up by mere moving of the mouse cursor
The text was updated successfully, but these errors were encountered:
<!--
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!
-->
This change discards widgets which are fully covered by another widget
in a higher layer from the hit test algorithm.
* Closes <#5498>
* [x] I have followed the instructions in the PR template
---------
Co-authored-by: Emil Ernerfeldt <[email protected]>
When multiple
custom_menu_button
are vertically aligned and close together, going in one button's menu auto-switch to the menu of the next one instead of letting me interact with the menu's content:custom-menu-bug.mp4
Repro
Step:
Expected: the menu stays open so I can interact with its content
Actual: the menu of the next button shows up by mere moving of the mouse cursor
The text was updated successfully, but these errors were encountered: