From 2e349a806aeee09b68ecf681953af0cb371b71a8 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 2 Jan 2024 10:12:57 -0700 Subject: [PATCH] Round tooltip co-ordinates --- crates/gpui2/src/elements/overlay.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/gpui2/src/elements/overlay.rs b/crates/gpui2/src/elements/overlay.rs index b5d8b53c7f..837d0734ad 100644 --- a/crates/gpui2/src/elements/overlay.rs +++ b/crates/gpui2/src/elements/overlay.rs @@ -147,7 +147,8 @@ impl Element for Overlay { desired.origin.y = limits.origin.y; } - cx.with_element_offset(desired.origin - bounds.origin, |cx| { + let offset = point(desired.origin.x.round(), desired.origin.y.round()); + cx.with_absolute_element_offset(offset, |cx| { cx.break_content_mask(|cx| { for child in &mut self.children { child.paint(cx);