From fc7e7e58160c156fd5d3cf0c11e0a475b68b3b45 Mon Sep 17 00:00:00 2001 From: Speak2Erase Date: Fri, 1 Sep 2023 08:07:10 -0700 Subject: [PATCH] fix: :bug: Fix event tooltip scaling --- src/components/map_view.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/map_view.rs b/src/components/map_view.rs index bfa91ef7..7f80739f 100644 --- a/src/components/map_view.rs +++ b/src/components/map_view.rs @@ -198,8 +198,10 @@ impl MapView { response = response.on_hover_ui_at_pointer(|ui| { ui.label(format!("Event {:0>3}: {:?}", event.id, event.name)); - let (response, painter) = - ui.allocate_painter(event_size, egui::Sense::click()); + let (response, painter) = ui.allocate_painter( + event_size * ui.ctx().pixels_per_point(), + egui::Sense::click(), + ); if let Some(sprite) = sprite { sprite.paint(&painter, response.rect); }