egui upgrade: Fix some debug_assert panics related to the use of "Area" (always add a .with() when using auto-id's for containers)

This commit is contained in:
Bu5hm4nn 2024-07-23 08:14:53 +02:00
parent 6806d56f7f
commit 157c1b6b31
3 changed files with 3 additions and 3 deletions

View File

@ -1656,7 +1656,7 @@ fn draw_seen_on(app: &mut GossipUi, ui: &mut Ui, note: &std::cell::Ref<NoteData>
let response = ui.add(Label::new(RichText::new("👁").size(12.0)).sense(Sense::hover()));
if response.hovered() {
egui::Area::new(ui.next_auto_id())
egui::Area::new(ui.next_auto_id().with("seen_on"))
.movable(false)
.interactable(false)
// .pivot(Align2::RIGHT_TOP) // Fails to work as advertised

View File

@ -1310,7 +1310,7 @@ impl GossipUi {
+ Vec2::new(-crate::AVATAR_SIZE_F32 * 2.0, -crate::AVATAR_SIZE_F32 * 2.0)
};
egui::Area::new(ui.next_auto_id())
egui::Area::new(ui.next_auto_id().with("plus"))
.movable(false)
.interactable(true)
.fixed_pos(pos)

View File

@ -39,7 +39,7 @@ pub(in crate::ui) fn show_contact_search(
let frame = egui::Frame::popup(ui.style())
.rounding(egui::Rounding::ZERO)
.inner_margin(egui::Margin::same(0.0));
let area = egui::Area::new(ui.next_auto_id())
let area = egui::Area::new(ui.next_auto_id().with("tt"))
.pivot(pivot)
.fixed_pos(fixed_pos)
.movable(false)