1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10: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:
Emil Ernerfeldt
2022-01-16 09:49:22 +01:00
parent ad5418777d
commit c713fd98dd
3 changed files with 4 additions and 6 deletions

View File

@@ -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: