mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
cargo fmt
This commit is contained in:
@@ -165,10 +165,10 @@ impl MenuState {
|
|||||||
&& data
|
&& data
|
||||||
.get_temp(item.with(Self::ID))
|
.get_temp(item.with(Self::ID))
|
||||||
.is_none_or(|item: Self| item.last_visible_pass + 1 < pass_nr)
|
.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
|
// If the open item wasn't shown for at least a frame, reset the open item
|
||||||
state.open_item = None;
|
state.open_item = None;
|
||||||
}
|
}
|
||||||
let r = f(&mut state);
|
let r = f(&mut state);
|
||||||
data.insert_temp(state_id, state);
|
data.insert_temp(state_id, state);
|
||||||
r
|
r
|
||||||
|
|||||||
@@ -992,7 +992,7 @@ impl CentralPanel {
|
|||||||
panel_ui.set_clip_rect(ctx.content_rect());
|
panel_ui.set_clip_rect(ctx.content_rect());
|
||||||
|
|
||||||
if false {
|
if false {
|
||||||
// TODO: @lucasmerlin shouldn't we enable this?
|
// TODO(emilk): @lucasmerlin shouldn't we enable this?
|
||||||
panel_ui
|
panel_ui
|
||||||
.response()
|
.response()
|
||||||
.widget_info(|| WidgetInfo::new(WidgetType::Panel));
|
.widget_info(|| WidgetInfo::new(WidgetType::Panel));
|
||||||
@@ -1026,6 +1026,7 @@ mod legacy {
|
|||||||
pub fn left(id: impl Into<Id>) -> Panel {
|
pub fn left(id: impl Into<Id>) -> Panel {
|
||||||
Panel::left(id)
|
Panel::left(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn right(id: impl Into<Id>) -> Panel {
|
pub fn right(id: impl Into<Id>) -> Panel {
|
||||||
Panel::right(id)
|
Panel::right(id)
|
||||||
}
|
}
|
||||||
@@ -1038,6 +1039,7 @@ mod legacy {
|
|||||||
pub fn top(id: impl Into<Id>) -> Panel {
|
pub fn top(id: impl Into<Id>) -> Panel {
|
||||||
Panel::top(id)
|
Panel::top(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn bottom(id: impl Into<Id>) -> Panel {
|
pub fn bottom(id: impl Into<Id>) -> Panel {
|
||||||
Panel::bottom(id)
|
Panel::bottom(id)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1271,7 +1271,8 @@ impl Areas {
|
|||||||
|
|
||||||
pub fn top_layer_id(&self, order: Order) -> Option<LayerId> {
|
pub fn top_layer_id(&self, order: Order) -> Option<LayerId> {
|
||||||
self.order
|
self.order
|
||||||
.iter().rfind(|layer| layer.order == order && !self.is_sublayer(layer))
|
.iter()
|
||||||
|
.rfind(|layer| layer.order == order && !self.is_sublayer(layer))
|
||||||
.copied()
|
.copied()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user