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:
@@ -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)).
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user