From 68876a42575fa105d623a93c3a1b98285d5067cb Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 2 Oct 2024 15:49:13 -0600 Subject: [PATCH] Reenable zoom with scroll --- src/tab.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index e81ffef..b56b2f8 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -872,6 +872,8 @@ pub enum Message { DndLeave(Location), WindowDrag, WindowToggleMaximize, + ZoomIn, + ZoomOut, } #[derive(Copy, Clone, Debug, Eq, PartialEq)] @@ -2447,6 +2449,12 @@ impl Tab { Message::WindowToggleMaximize => { commands.push(Command::WindowToggleMaximize); } + Message::ZoomIn => { + commands.push(Command::Action(Action::ZoomIn)); + } + Message::ZoomOut => { + commands.push(Command::Action(Action::ZoomOut)); + } } // Scroll to top if needed @@ -4010,7 +4018,6 @@ pub fn respond_to_scroll_direction(delta: ScrollDelta, modifiers: Modifiers) -> ScrollDelta::Pixels { y, .. } => y, }; - /*TODO if delta_y > 0.0 { return Some(Message::ZoomIn); } @@ -4018,7 +4025,6 @@ pub fn respond_to_scroll_direction(delta: ScrollDelta, modifiers: Modifiers) -> if delta_y < 0.0 { return Some(Message::ZoomOut); } - */ None }