Fix overlay position calculation

(but keep rounding)
This commit is contained in:
Conrad Irwin 2024-01-02 18:17:26 -07:00
parent d637657a99
commit 4ab5fa564d

View file

@ -149,7 +149,9 @@ impl Element for Overlay {
desired.origin.y = limits.origin.y;
}
cx.with_element_offset(desired.origin - bounds.origin, |cx| {
let mut offset = cx.element_offset() + desired.origin - bounds.origin;
offset = point(offset.x.round(), offset.y.round());
cx.with_absolute_element_offset(offset, |cx| {
cx.break_content_mask(|cx| {
for child in &mut self.children {
child.paint(cx);