From 7f877f72a373514d298259ad7c6a6b3a5e10432c Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 20 Feb 2025 18:51:26 -0500 Subject: [PATCH] fix: invert scroll direction --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 065cf57..bad9de5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -555,7 +555,8 @@ impl Application for App { // TODO: Should x scroll be handled too? // Best time/pixel count? let direction = match delta { - ScrollDelta::Pixels { x: _, y } => { + ScrollDelta::Pixels { x: _, mut y } => { + y = -y; let previous_scroll = if let Some((scroll, last_scroll_time)) = self.scroll { if last_scroll_time.elapsed() > Duration::from_millis(100) { @@ -584,7 +585,8 @@ impl Application for App { return Task::none(); } } - ScrollDelta::Lines { x: _, y } => { + ScrollDelta::Lines { x: _, mut y } => { + y = -y; self.scroll = None; if y < 0. { ScrollDirection::Prev