Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Round tooltip co-ordinates

Conrad Irwin2e349a806aee
diff --git a/crates/gpui2/src/elements/overlay.rs b/crates/gpui2/src/elements/overlay.rs
index b5d8b53c7f6..837d0734add 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);