egui icon indicating copy to clipboard operation
egui copied to clipboard

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

Open willser opened this issue 3 years ago • 2 comments

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 avatar Apr 27 '22 12:04 willser

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.

emilk avatar Apr 30 '22 10:04 emilk

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:

willser avatar Apr 30 '22 14:04 willser