mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-17 21:56:21 +00:00
Improve formatting
This commit is contained in:
parent
70b446fb07
commit
da81720a00
@ -264,12 +264,18 @@ fn input_event(
|
|||||||
Event::WindowEvent {
|
Event::WindowEvent {
|
||||||
event: WindowEvent::MouseWheel { delta, .. },
|
event: WindowEvent::MouseWheel { delta, .. },
|
||||||
..
|
..
|
||||||
} => Some(input::Event::Zoom(match delta {
|
} => {
|
||||||
MouseScrollDelta::LineDelta(_, y) => (*y as f64) * ZOOM_FACTOR_LINE,
|
let delta = match delta {
|
||||||
MouseScrollDelta::PixelDelta(PhysicalPosition { y, .. }) => {
|
MouseScrollDelta::LineDelta(_, y) => {
|
||||||
y * ZOOM_FACTOR_PIXEL
|
(*y as f64) * ZOOM_FACTOR_LINE
|
||||||
}
|
}
|
||||||
})),
|
MouseScrollDelta::PixelDelta(PhysicalPosition {
|
||||||
|
y, ..
|
||||||
|
}) => y * ZOOM_FACTOR_PIXEL,
|
||||||
|
};
|
||||||
|
|
||||||
|
Some(input::Event::Zoom(delta))
|
||||||
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user