Skip to content

Commit

Permalink
Increase scroll-speed on glium from 8 to 50 points per scroll tick
Browse files Browse the repository at this point in the history
Closes #461
Closes #702
  • Loading branch information
emilk committed Sep 7, 2021
1 parent aef2375 commit 2498765
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions eframe/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions egui_glium/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
4 changes: 2 additions & 2 deletions egui_glium/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions egui_web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

## 0.14.1 - 2021-08-28
### 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.

Expand All @@ -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.

Expand All @@ -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`.
Expand Down Expand Up @@ -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`).
Expand Down
3 changes: 2 additions & 1 deletion egui_web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 2498765

Please sign in to comment.