Browse Source

[menu] Fix minor size issue of menu bars

pull/30/head
Emil Ernerfeldt 4 years ago
parent
commit
15c5e0b04d
  1. 4
      egui/src/menu.rs

4
egui/src/menu.rs

@ -38,8 +38,8 @@ impl BarState {
} }
pub fn bar<R>(ui: &mut Ui, add_contents: impl FnOnce(&mut Ui) -> R) -> (R, Response) { pub fn bar<R>(ui: &mut Ui, add_contents: impl FnOnce(&mut Ui) -> R) -> (R, Response) {
ui.horizontal(|ui| { Frame::menu_bar(ui.style()).show(ui, |ui| {
Frame::menu_bar(ui.style()).show(ui, |ui| { ui.horizontal(|ui| {
let mut style = ui.style().clone(); let mut style = ui.style().clone();
style.spacing.button_padding = vec2(2.0, 0.0); style.spacing.button_padding = vec2(2.0, 0.0);
// style.visuals.widgets.active.bg_fill = TRANSPARENT; // style.visuals.widgets.active.bg_fill = TRANSPARENT;

Loading…
Cancel
Save