Round tooltip co-ordinates

This commit is contained in:
Conrad Irwin 2024-01-02 10:12:57 -07:00
parent 0f33775a91
commit 2e349a806a

View file

@ -147,7 +147,8 @@ impl Element for Overlay {
desired.origin.y = limits.origin.y; 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| { cx.break_content_mask(|cx| {
for child in &mut self.children { for child in &mut self.children {
child.paint(cx); child.paint(cx);