Fix horizontal scrolling direction on Linux
Closes https://github.com/emilk/egui/issues/356 Work-around until https://github.com/rust-windowing/winit/pull/2105 is merged and released
This commit is contained in:
parent
ad5418777d
commit
c713fd98dd
3 changed files with 4 additions and 6 deletions
|
@ -8,6 +8,7 @@ NOTE: [`egui_web`](egui_web/CHANGELOG.md), [`egui-winit`](egui-winit/CHANGELOG.m
|
||||||
* Removed `Frame::alloc_texture`. Use `egui::Context::load_texture` instead ([#1110](https://github.com/emilk/egui/pull/1110)).
|
* Removed `Frame::alloc_texture`. Use `egui::Context::load_texture` instead ([#1110](https://github.com/emilk/egui/pull/1110)).
|
||||||
* The default native backend is now `egui_glow` (instead of `egui_glium`) ([#1020](https://github.com/emilk/egui/pull/1020)).
|
* The default native backend is now `egui_glow` (instead of `egui_glium`) ([#1020](https://github.com/emilk/egui/pull/1020)).
|
||||||
* The default web painter is now `egui_glow` (instead of WebGL) ([#1020](https://github.com/emilk/egui/pull/1020)).
|
* The default web painter is now `egui_glow` (instead of WebGL) ([#1020](https://github.com/emilk/egui/pull/1020)).
|
||||||
|
* Fix horizontal scrolling direction on Linux.
|
||||||
|
|
||||||
|
|
||||||
## 0.16.0 - 2021-12-29
|
## 0.16.0 - 2021-12-29
|
||||||
|
|
|
@ -4,6 +4,7 @@ All notable changes to the `egui-winit` integration will be noted in this file.
|
||||||
|
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
* Fix horizontal scrolling direction on Linux.
|
||||||
* Replaced `std::time::Instant` with `instant::Instant` for WebAssembly compatability ([#1023](https://github.com/emilk/egui/pull/1023))
|
* Replaced `std::time::Instant` with `instant::Instant` for WebAssembly compatability ([#1023](https://github.com/emilk/egui/pull/1023))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -453,12 +453,8 @@ impl State {
|
||||||
egui::vec2(delta.x as f32, delta.y as f32) / self.pixels_per_point()
|
egui::vec2(delta.x as f32, delta.y as f32) / self.pixels_per_point()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if cfg!(target_os = "macos") {
|
|
||||||
delta.x *= -1.0; // until https://github.com/rust-windowing/winit/pull/2105 is merged and released
|
delta.x *= -1.0; // Winit has inverted hscroll. Remove this line when we update winit after https://github.com/rust-windowing/winit/pull/2105 is merged and released
|
||||||
}
|
|
||||||
if cfg!(target_os = "windows") {
|
|
||||||
delta.x *= -1.0; // until https://github.com/rust-windowing/winit/pull/2101 is merged and released
|
|
||||||
}
|
|
||||||
|
|
||||||
if self.egui_input.modifiers.ctrl || self.egui_input.modifiers.command {
|
if self.egui_input.modifiers.ctrl || self.egui_input.modifiers.command {
|
||||||
// Treat as zoom instead:
|
// Treat as zoom instead:
|
||||||
|
|
Loading…
Reference in a new issue