Skip to content
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

Getting strange shadow when click a menu button which doesn't has any button. #1537

Open
willser opened this issue Apr 27, 2022 · 2 comments
Labels
bug Something is broken low priority Minor issue or feature request visuals Renderings / graphics releated

Comments

@willser
Copy link

willser commented Apr 27, 2022

Hi ,I have a strange bug writing my new project by using egui.

Describe the bug
Getting strange shadow when click a menu button which doesn't has any button.

To Reproduce
Steps to reproduce the behavior:

egui::menu::bar(ui, |ui| {
    ui.menu_button("New", |ui| {
        if ui.button("Http").clicked() {
            self.requests.insert(0, Http::default());
        }
    });
    ui.menu_button("Settings", |_ui| self.settings.show_settings = true);
});

In weaver

Expected behavior

Screenshots
image

It's ok if the menu button has a button.

Desktop (please complete the following information):

  • OS: windows 10
  • Version 0.17.0

Thank you for your contribution,this is a a amazing crate.

@willser willser added the bug Something is broken label Apr 27, 2022
@emilk emilk added low priority Minor issue or feature request visuals Renderings / graphics releated labels Apr 30, 2022
@emilk
Copy link
Owner

emilk commented Apr 30, 2022

There's not much sense in opening an empty menu, and I guess the painting code doesn't handle it well. Seems like you would want to use a normal button in this case.

@willser
Copy link
Author

willser commented Apr 30, 2022

There's not much sense in opening an empty menu, and I guess the painting code doesn't handle it well. Seems like you would want to use a normal button in this case.

Yeah.You are right.It's not common that there is an empty menu.Maybe I should add a button below it.Thank you.:smiley:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken low priority Minor issue or feature request visuals Renderings / graphics releated
Projects
None yet
Development

No branches or pull requests

2 participants