mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Update to winit 0.27.2, glutin 0.29.0, glium 0.32 (#1914)
This commit is contained in:
@@ -400,7 +400,7 @@ impl State {
|
||||
}
|
||||
|
||||
fn on_mouse_wheel(&mut self, delta: winit::event::MouseScrollDelta) {
|
||||
let mut delta = match delta {
|
||||
let delta = match delta {
|
||||
winit::event::MouseScrollDelta::LineDelta(x, y) => {
|
||||
let points_per_scroll_line = 50.0; // Scroll speed decided by consensus: https://github.com/emilk/egui/issues/461
|
||||
egui::vec2(x, y) * points_per_scroll_line
|
||||
@@ -410,8 +410,6 @@ impl State {
|
||||
}
|
||||
};
|
||||
|
||||
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:
|
||||
let factor = (delta.y / 200.0).exp();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
pub struct WindowSettings {
|
||||
/// Position of window in physical pixels. This is either
|
||||
/// the inner or outer position depending on the platform.
|
||||
/// See [`winit::window::WindowAttributes`] for details.
|
||||
/// See [`winit::window::WindowBuilder::with_position`] for details.
|
||||
position: Option<egui::Pos2>,
|
||||
|
||||
fullscreen: bool,
|
||||
|
||||
Reference in New Issue
Block a user