From 7feb672e7e08ac9657fa6d462ebed41637fc0e93 Mon Sep 17 00:00:00 2001 From: Pete Gregory Date: Mon, 22 Dec 2025 17:33:33 +0000 Subject: [PATCH] fix timeline popover --- lib/components/pages/loco_timeline/timeline_grid.dart | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/components/pages/loco_timeline/timeline_grid.dart b/lib/components/pages/loco_timeline/timeline_grid.dart index c9383ff..ad919af 100644 --- a/lib/components/pages/loco_timeline/timeline_grid.dart +++ b/lib/components/pages/loco_timeline/timeline_grid.dart @@ -447,13 +447,11 @@ class _ValueBlockMenu extends StatelessWidget { final overlay = Overlay.of(context); final renderBox = overlay?.context.findRenderObject() as RenderBox?; if (renderBox == null) return; + // Translate from global screen coordinates into the overlay's local space + // so the menu appears where the gesture happened. + final localPosition = renderBox.globalToLocal(globalPosition); final position = RelativeRect.fromRect( - Rect.fromLTWH( - globalPosition.dx, - globalPosition.dy, - 1, - 1, - ), + Rect.fromLTWH(localPosition.dx, localPosition.dy, 1, 1), Offset.zero & renderBox.size, );