1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30: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

@@ -7,6 +7,8 @@ All notable changes to the `egui_glium` integration will be noted in this file.
* Remove "http" feature (use https://github.com/emilk/ehttp instead!).
* Add `epi::NativeTexture` trait for glium painter
* Deprecate 'Painter::register_glium_texture'
* Increase scroll speed.
## 0.14.0 - 2021-08-24
* Fix native file dialogs hanging (eg. when using [`rfd`](https://github.com/PolyMeilex/rfd)).

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