diff --git a/crates/egui/src/containers/menu.rs b/crates/egui/src/containers/menu.rs index a25e4e7ab..756d68dd3 100644 --- a/crates/egui/src/containers/menu.rs +++ b/crates/egui/src/containers/menu.rs @@ -165,10 +165,10 @@ impl MenuState { && data .get_temp(item.with(Self::ID)) .is_none_or(|item: Self| item.last_visible_pass + 1 < pass_nr) - { - // If the open item wasn't shown for at least a frame, reset the open item - state.open_item = None; - } + { + // If the open item wasn't shown for at least a frame, reset the open item + state.open_item = None; + } let r = f(&mut state); data.insert_temp(state_id, state); r diff --git a/crates/egui/src/containers/panel.rs b/crates/egui/src/containers/panel.rs index b160f1d75..b05c72118 100644 --- a/crates/egui/src/containers/panel.rs +++ b/crates/egui/src/containers/panel.rs @@ -992,7 +992,7 @@ impl CentralPanel { panel_ui.set_clip_rect(ctx.content_rect()); if false { - // TODO: @lucasmerlin shouldn't we enable this? + // TODO(emilk): @lucasmerlin shouldn't we enable this? panel_ui .response() .widget_info(|| WidgetInfo::new(WidgetType::Panel)); @@ -1026,6 +1026,7 @@ mod legacy { pub fn left(id: impl Into) -> Panel { Panel::left(id) } + pub fn right(id: impl Into) -> Panel { Panel::right(id) } @@ -1038,6 +1039,7 @@ mod legacy { pub fn top(id: impl Into) -> Panel { Panel::top(id) } + pub fn bottom(id: impl Into) -> Panel { Panel::bottom(id) } diff --git a/crates/egui/src/memory/mod.rs b/crates/egui/src/memory/mod.rs index c106c154c..d215a3bec 100644 --- a/crates/egui/src/memory/mod.rs +++ b/crates/egui/src/memory/mod.rs @@ -1271,7 +1271,8 @@ impl Areas { pub fn top_layer_id(&self, order: Order) -> Option { self.order - .iter().rfind(|layer| layer.order == order && !self.is_sublayer(layer)) + .iter() + .rfind(|layer| layer.order == order && !self.is_sublayer(layer)) .copied() }