Menu bar buttons have too much space on the bottom
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Describe the bug**
Buttons in the menu bar have more padding between the bottom of the menu bar and the button, than between the top of the menu bar and the button.
**To Reproduce**
Steps to reproduce the behavior:
```rs
egui::TopBottomPanel::top(0).show(ctx, |ui| {
egui::menu::bar(ui, |ui| {
ui.menu_button("All", |ui| {
if ui.button("Quit").clicked() {
quit = true;
}
});
});
});
```
**Expected behavior**
There should be equal amount of space on the top and bottom of menu buttons.
**Screenshots**


**Desktop:**
- OS: Linux, Wayland
- Browser: N/A
- Version: 5.19.3
Contributor guide
Research direction
Reproduce the spacing issue with the shown TopBottomPanel and egui::menu::bar snippet, checking the current master version as requested in the report. Start at the menu bar and button layout entry points, then verify that the top and bottom spacing are equal in the resulting UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100