1
0
Fork 0

Simplify resize handle hover handling

This commit is contained in:
Robbert van der Helm 2022-03-29 18:50:34 +02:00
parent 8d91020238
commit 63a087f265

View file

@ -69,11 +69,10 @@ impl View for ResizeHandle {
} }
} }
WindowEvent::MouseMove(x, y) => { WindowEvent::MouseMove(x, y) => {
if !intersects_triangle(cx.cache.get_bounds(cx.current), (x, y)) { cx.current.set_hover(
cx.current.set_hover(cx, false); cx,
} else { intersects_triangle(cx.cache.get_bounds(cx.current), (x, y)),
cx.current.set_hover(cx, true); );
}
if self.drag_active { if self.drag_active {
// We need to convert our measurements into physical pixels relative to the // We need to convert our measurements into physical pixels relative to the