Add helper for accumulating scroll into discrete delta

This converts `ScrollDelta::Pixels` and `ScrollDelta::Lines` into
integer values, accumulating partial scrolls until a full integer is
reached.

It also has a configurable rate-limit, so discrete integer events can
occur at a certain maximum frequency. This may need tuning for different
use cases, though I haven't tried using it for things other than
changing workspaces so far.
This commit is contained in:
Ian Douglas Scott 2025-10-13 13:59:45 -07:00 committed by Ian Douglas Scott
parent 05c6608842
commit 2f0b333491
2 changed files with 114 additions and 0 deletions

View file

@ -108,6 +108,8 @@ pub mod task;
pub mod theme;
pub mod scroll;
#[doc(inline)]
pub use theme::{Theme, style};