diff options
author | 2019-10-25 03:47:34 +0200 | |
---|---|---|
committer | 2019-10-25 03:47:34 +0200 | |
commit | 719c073fc67c87d6b2da1bc01b74751d3f5e59f0 (patch) | |
tree | 660613d215cafc01a30911c22a5ba107fb61b12c /winit/src/application.rs | |
parent | 4769272122e8cd0a4d666bb06c00cb27f8cad3c4 (diff) | |
download | iced-719c073fc67c87d6b2da1bc01b74751d3f5e59f0.tar.gz iced-719c073fc67c87d6b2da1bc01b74751d3f5e59f0.tar.bz2 iced-719c073fc67c87d6b2da1bc01b74751d3f5e59f0.zip |
Draft `Scrollable` widget (no clipping yet!)
Diffstat (limited to 'winit/src/application.rs')
-rw-r--r-- | winit/src/application.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/winit/src/application.rs b/winit/src/application.rs index 418ee3c4..870f4868 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -136,6 +136,17 @@ pub trait Application { state: conversion::button_state(state), })); } + WindowEvent::MouseWheel { delta, .. } => match delta { + winit::event::MouseScrollDelta::LineDelta( + delta_x, + delta_y, + ) => { + events.push(Event::Mouse( + mouse::Event::WheelScrolled { delta_x, delta_y }, + )); + } + _ => {} + }, WindowEvent::CloseRequested => { *control_flow = ControlFlow::Exit; } |