mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
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:
@@ -4,6 +4,7 @@ All notable changes to the `egui-winit` integration will be noted in this file.
|
||||
|
||||
|
||||
## 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))
|
||||
|
||||
|
||||
|
||||
@@ -453,12 +453,8 @@ impl State {
|
||||
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
|
||||
}
|
||||
if cfg!(target_os = "windows") {
|
||||
delta.x *= -1.0; // until https://github.com/rust-windowing/winit/pull/2101 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 self.egui_input.modifiers.ctrl || self.egui_input.modifiers.command {
|
||||
// Treat as zoom instead:
|
||||
|
||||
Reference in New Issue
Block a user