1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Increase scroll-speed on glium from 8 to 50 points per scroll tick

Closes https://github.com/emilk/egui/issues/461
Closes https://github.com/emilk/egui/pull/702
This commit is contained in:
Emil Ernerfeldt
2021-09-07 19:45:13 +02:00
parent aef23753ca
commit 249876523d
5 changed files with 14 additions and 10 deletions

View File

@@ -251,8 +251,8 @@ pub fn input_to_egui(
WindowEvent::MouseWheel { delta, .. } => {
let mut delta = match *delta {
glutin::event::MouseScrollDelta::LineDelta(x, y) => {
let line_height = 8.0; // magic value!
vec2(x, y) * line_height
let points_per_scroll_line = 50.0; // Scroll speed decided by consensus: https://github.com/emilk/egui/issues/461
vec2(x, y) * points_per_scroll_line
}
glutin::event::MouseScrollDelta::PixelDelta(delta) => {
vec2(delta.x as f32, delta.y as f32) / pixels_per_point