Reapply "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 reverts commit 419fffa0f0.
This commit is contained in:
Mike Dilger 2024-08-06 12:29:27 +12:00
parent e0d4682ff2
commit ab32fcd27f
3 changed files with 3 additions and 3 deletions

View File

@ -1649,7 +1649,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

@ -1314,7 +1314,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)