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

@ -4,6 +4,7 @@ All notable changes to the `eframe` crate.
## Unreleased
* Remove "http" feature (use https://github.com/emilk/ehttp instead!).
* Increase scroll speed.
## 0.14.0 - 2021-08-24

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

View file

@ -4,21 +4,22 @@ All notable changes to the `egui_web` integration will be noted in this file.
## Unreleased
### Added
* Remove "http" feature (use https://github.com/emilk/ehttp instead!).
* `epi::NativeTexture` trait for webgl1 webgl2 painter
* Deprecate `Painter::register_webgl_texture`
* Deprecate `Painter::register_webgl_texture`
### Changed 🔧
* Increase scroll speed.
## 0.14.1 - 2021-08-28
### Fixed 🐛
* Fix alpha blending for WebGL2 and WebGL1 with sRGB support backends, now having identical results as egui_glium.
* Fix use of egui on devices with both touch and mouse.
## 0.14.0 - 2021-08-24
### Added ⭐
* Added support for dragging and dropping files into the browser window.
@ -27,7 +28,6 @@ All notable changes to the `egui_web` integration will be noted in this file.
## 0.13.0 - 2021-06-24
### Changed 🔧
* Default to light visuals unless the system reports a preference for dark mode.
@ -37,19 +37,18 @@ All notable changes to the `egui_web` integration will be noted in this file.
## 0.12.0 - 2021-05-10
### Fixed 🐛
* Scroll faster when scrolling with mouse wheel.
## 0.11.0 - 2021-04-05
### Added ⭐
* [Fix mobile and IME text input](https://github.com/emilk/egui/pull/253)
* Hold down a modifier key when clicking a link to open it in a new tab.
Contributors: [n2](https://github.com/n2)
## 0.10.0 - 2021-02-28
### Added ⭐
* You can control the maximum egui canvas size with `App::max_size_points`.
@ -90,6 +89,7 @@ Contributors: [n2](https://github.com/n2)
* Set a maximum canvas size to alleviate performance issues on some machines
* Simplify `egui_web::start` arguments
## 0.4.0 - 2020-11-28
### Added ⭐
* A simple HTTP fetch API (wraps `web_sys`).

View file

@ -1048,7 +1048,8 @@ fn install_canvas_events(runner_ref: &AppRunnerRef) -> Result<(), JsValue> {
canvas_size_in_points(runner_ref.0.lock().canvas_id()).y
}
web_sys::WheelEvent::DOM_DELTA_LINE => {
8.0 // magic value!
let points_per_scroll_line = 50.0; // Scroll speed decided by consensus: https://github.com/emilk/egui/issues/461
points_per_scroll_line
}
_ => 1.0,
};