From 13f1bf1e2d9f757d0d3b8e40c0084de624f156e4 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 19 Nov 2026 13:23:52 -0500 Subject: [PATCH] Navigation: a wheel notch eases unless animation effects are reduced, as production (F-48) --- Cargo.lock | 1 + crates/ui-egui/src/app/prefs.rs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5744ed9d1..45687e5c99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1886,6 +1886,7 @@ name = "craft-pages" version = "0.1.0" dependencies = [ "craft-behavior", + "craft-keymap", "craft-text", "craft-theme", "craft-ui", diff --git a/crates/ui-egui/src/app/prefs.rs b/crates/ui-egui/src/app/prefs.rs index e97ec3d432..4423bd238a 100644 --- a/crates/ui-egui/src/app/prefs.rs +++ b/crates/ui-egui/src/app/prefs.rs @@ -41,8 +41,8 @@ fn from_name(name: &str) -> Option { } impl PdfCraftApp { - /// The canvas's navigation choices: the scroll speed, the middle-button direction and whether zooms ease. The - /// rest keep the framework's defaults. + /// The canvas's navigation choices: the scroll speed, the middle-button direction and whether zooms and wheel + /// notches ease. The rest keep the framework's defaults. pub(crate) fn navigation_options(&self) -> craft::ui::canvas::NavigationOptions { let mut options = craft::ui::canvas::NavigationOptions::default(); options.wheel_line = self.scroll_speed.wheel_line(); @@ -52,7 +52,9 @@ impl PdfCraftApp { if cfg!(target_os = "linux") { options.middle_button = craft::behavior::MiddleButton::AutoScroll; } - options.animated_zoom = !self.animation_effects.reduced(None); + let eased = !self.animation_effects.reduced(None); + options.animated_zoom = eased; + options.eased_wheel = eased; options }